1 5 package xdoclet.modules.jdo; 6 7 import java.util.ArrayList ; 8 9 import java.util.Collection ; 10 import java.util.Iterator ; 11 12 17 public class VendorExtension 18 { 19 20 private String vendor; 21 private String key; 22 private String value; 23 private Collection nestedExtensions; 24 25 32 public VendorExtension(String vendor, String key, String value) 33 { 34 super(); 35 this.vendor = vendor; 36 this.key = key; 37 this.value = value; 38 } 39 40 public String getVendor() 41 { 42 return vendor; 43 } 44 45 public String getKey() 46 { 47 return key; 48 } 49 50 public String getValue() 51 { 52 return value; 53 } 54 55 public Collection getNestedExtensions() 56 { 57 return nestedExtensions; 58 } 59 60 public boolean hasNestedExtensions() 61 { 62 return nestedExtensions != null && nestedExtensions.size() > 0; 63 } 64 65 public Iterator nestedExtensionsIterator() 66 { 67 return nestedExtensions.iterator(); 68 } 69 70 public void addNestedExtension(VendorExtension nestedExtension) 71 { 72 if (nestedExtensions == null) { 73 nestedExtensions = new ArrayList (); 74 } 75 nestedExtensions.add(nestedExtension); 76 } 77 } 78 | Popular Tags |