KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > juddi > datatype > IdentifierBag


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.juddi.datatype;
17
18 import java.util.Vector JavaDoc;
19
20 /**
21  * @author Steve Viens (sviens@apache.org)
22  */

23 public class IdentifierBag implements RegistryObject
24 {
25   Vector JavaDoc keyedReferenceVector;
26
27   /**
28    *
29    */

30   public IdentifierBag()
31   {
32   }
33
34   /**
35    *
36    */

37   public IdentifierBag(int size)
38   {
39     this.keyedReferenceVector = new Vector JavaDoc(size);
40   }
41
42   /**
43    *
44    */

45   public void addKeyedReference(KeyedReference keyedRef)
46   {
47     if (this.keyedReferenceVector == null)
48       this.keyedReferenceVector = new Vector JavaDoc();
49     this.keyedReferenceVector.add(keyedRef);
50   }
51
52   /**
53    *
54    */

55   public void setKeyedReferenceVector(Vector JavaDoc keyedRefVector)
56   {
57     this.keyedReferenceVector = keyedRefVector;
58   }
59
60   /**
61    *
62    */

63   public Vector JavaDoc getKeyedReferenceVector()
64   {
65     return this.keyedReferenceVector;
66   }
67
68   /**
69    *
70    */

71   public int size()
72   {
73     if (this.keyedReferenceVector != null)
74       return this.keyedReferenceVector.size();
75     else
76       return 0;
77   }
78 }
Popular Tags