118 |
* |
* |
119 |
* @param o the object to look for |
* @param o the object to look for |
120 |
* @return true if it is found in the set |
* @return true if it is found in the set |
121 |
|
* @throws ClassCastException if the type of o is not a valid type |
122 |
|
* for this set. |
123 |
|
* @throws NullPointerException if o is null and this set doesn't |
124 |
|
* support null values. |
125 |
*/ |
*/ |
126 |
boolean contains(Object o); |
boolean contains(Object o); |
127 |
|
|
133 |
* @param c the collection to check membership in |
* @param c the collection to check membership in |
134 |
* @return true if all elements in this set are in c |
* @return true if all elements in this set are in c |
135 |
* @throws NullPointerException if c is null |
* @throws NullPointerException if c is null |
136 |
|
* @throws ClassCastException if the type of any element in c is not |
137 |
|
* a valid type for this set. |
138 |
|
* @throws NullPointerException if some element of c is null and this |
139 |
|
* set doesn't support null values. |
140 |
* @see #contains(Object) |
* @see #contains(Object) |
141 |
*/ |
*/ |
142 |
boolean containsAll(Collection c); |
boolean containsAll(Collection c); |
156 |
* equals, this is the sum of the hashcode of all elements in the set. |
* equals, this is the sum of the hashcode of all elements in the set. |
157 |
* |
* |
158 |
* @return the sum of the hashcodes of all set elements |
* @return the sum of the hashcodes of all set elements |
159 |
|
* @see #equals(Object) |
160 |
*/ |
*/ |
161 |
int hashCode(); |
int hashCode(); |
162 |
|
|
183 |
* @param o the object to remove |
* @param o the object to remove |
184 |
* @return true if the set changed (an object was removed) |
* @return true if the set changed (an object was removed) |
185 |
* @throws UnsupportedOperationException if this operation is not allowed |
* @throws UnsupportedOperationException if this operation is not allowed |
186 |
|
* @throws ClassCastException if the type of o is not a valid type |
187 |
|
* for this set. |
188 |
|
* @throws NullPointerException if o is null and this set doesn't allow |
189 |
|
* the removal of a null value. |
190 |
*/ |
*/ |
191 |
boolean remove(Object o); |
boolean remove(Object o); |
192 |
|
|
199 |
* @return true if this set changed as a result |
* @return true if this set changed as a result |
200 |
* @throws UnsupportedOperationException if this operation is not allowed |
* @throws UnsupportedOperationException if this operation is not allowed |
201 |
* @throws NullPointerException if c is null |
* @throws NullPointerException if c is null |
202 |
|
* @throws ClassCastException if the type of any element in c is not |
203 |
|
* a valid type for this set. |
204 |
|
* @throws NullPointerException if some element of c is null and this |
205 |
|
* set doesn't support removing null values. |
206 |
* @see #remove(Object) |
* @see #remove(Object) |
207 |
*/ |
*/ |
208 |
boolean removeAll(Collection c); |
boolean removeAll(Collection c); |
216 |
* @return true if this set was modified |
* @return true if this set was modified |
217 |
* @throws UnsupportedOperationException if this operation is not allowed |
* @throws UnsupportedOperationException if this operation is not allowed |
218 |
* @throws NullPointerException if c is null |
* @throws NullPointerException if c is null |
219 |
|
* @throws ClassCastException if the type of any element in c is not |
220 |
|
* a valid type for this set. |
221 |
|
* @throws NullPointerException if some element of c is null and this |
222 |
|
* set doesn't support retaining null values. |
223 |
* @see #remove(Object) |
* @see #remove(Object) |
224 |
*/ |
*/ |
225 |
boolean retainAll(Collection c); |
boolean retainAll(Collection c); |