KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > common > domains > registry > ContactDataSet


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.admin.common.domains.registry;
25 import java.util.HashSet JavaDoc;
26 import java.util.Collection JavaDoc;
27 /**
28  * This class represents a collection of {@link ContactData}
29  * elements. It is a set that guarantees that its elements are
30  * instances of {@link ContactData}
31  *
32  * @author <a HREF="mailto:toby.h.ferguson@sun.com">Toby H Ferguson</a>
33  * @version 1.0
34  */

35 public class ContactDataSet extends HashSet JavaDoc
36 {
37
38   public ContactDataSet(){
39     super();
40   }
41
42
43       /**
44          Construct a new instance, adding all the members from the
45          given collection.
46          <p>
47          Precondition - all members of the collection are instances of
48          the {@link ContactData} class
49          <p>
50          postcondition - the returned instance contains all the
51          members of the given collection, and only those members
52          @param c the given collection
53          @throws NullPointerException if c is null
54          @throws ClassCastException if one of the members of c is not
55          an instance of the {@link ContactData} class
56       */

57   public ContactDataSet(Collection JavaDoc c) throws NullPointerException JavaDoc, ClassCastException JavaDoc{
58     super(c);
59   }
60
61   public ContactDataSet(int initialCapacity){
62     super(initialCapacity);
63   }
64
65   public ContactDataSet(int initialCapacity, float loadFactor){
66     super(initialCapacity, loadFactor);
67   }
68
69       /**
70          Add the given object to the receiver.
71          <p>
72          precondition - the given object is an instance of the {@link
73          ContactData} class
74          <p>
75          postcondition - the receiver contains the given object
76          @param o the object to be added
77          @return true iff the receiver changed as a result of adding
78          this object
79          @throws NullPointerException if the object is null
80          @throws ClassCastException if the object is not an instance
81          of {@link ContactData} class
82       */

83   public boolean add(Object JavaDoc o) throws NullPointerException JavaDoc, ClassCastException JavaDoc{
84     return super.add((ContactData) o);
85   }
86   
87 }
88
Popular Tags