1 16 package org.apache.juddi.datatype; 17 18 import java.util.Vector ; 19 20 26 public class TModelBag implements RegistryObject 27 { 28 Vector tModelKeyVector; 29 30 33 public TModelBag() 34 { 35 } 36 37 40 public TModelBag(int size) 41 { 42 this.tModelKeyVector = new Vector (size); 43 } 44 45 48 public void addTModelKey(TModelKey key) 49 { 50 if ((key != null) && (key.getValue() != null)) 51 this.addTModelKey(key.getValue()); 52 } 53 54 57 public void addTModelKey(String key) 58 { 59 if (this.tModelKeyVector == null) 60 this.tModelKeyVector = new Vector (); 61 this.tModelKeyVector.add(key); 62 } 63 64 67 public void setTModelKeyVector(Vector keyVector) 68 { 69 this.tModelKeyVector = keyVector; 70 } 71 72 75 public Vector getTModelKeyVector() 76 { 77 return this.tModelKeyVector; 78 } 79 80 83 public int size() 84 { 85 if (this.tModelKeyVector != null) 86 return this.tModelKeyVector.size(); 87 else 88 return 0; 89 } 90 } | Popular Tags |