KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xdoclet > modules > jdo > VendorExtension


1 /*
2  * Copyright (c) 2001, 2002 The XDoclet team
3  * All rights reserved.
4  */

5 package xdoclet.modules.jdo;
6
7 import java.util.ArrayList JavaDoc;
8
9 import java.util.Collection JavaDoc;
10 import java.util.Iterator JavaDoc;
11
12 /**
13  * @author Ludovic Claude (ludovicc@users.sourceforge.net)
14  * @created 10 October 2002
15  * @version $Revision: 1.1 $
16  */

17 public class VendorExtension
18 {
19
20     private String JavaDoc vendor;
21     private String JavaDoc key;
22     private String JavaDoc value;
23     private Collection JavaDoc nestedExtensions;
24
25     /**
26      * Constructor for VendorExtension.
27      *
28      * @param vendor
29      * @param key
30      * @param value
31      */

32     public VendorExtension(String JavaDoc vendor, String JavaDoc key, String JavaDoc value)
33     {
34         super();
35         this.vendor = vendor;
36         this.key = key;
37         this.value = value;
38     }
39
40     public String JavaDoc getVendor()
41     {
42         return vendor;
43     }
44
45     public String JavaDoc getKey()
46     {
47         return key;
48     }
49
50     public String JavaDoc getValue()
51     {
52         return value;
53     }
54
55     public Collection JavaDoc getNestedExtensions()
56     {
57         return nestedExtensions;
58     }
59
60     public boolean hasNestedExtensions()
61     {
62         return nestedExtensions != null && nestedExtensions.size() > 0;
63     }
64
65     public Iterator JavaDoc nestedExtensionsIterator()
66     {
67         return nestedExtensions.iterator();
68     }
69
70     public void addNestedExtension(VendorExtension nestedExtension)
71     {
72         if (nestedExtensions == null) {
73             nestedExtensions = new ArrayList JavaDoc();
74         }
75         nestedExtensions.add(nestedExtension);
76     }
77 }
78
Popular Tags