DthingApi
|
Public Member Functions | |
boolean | add (E object) |
boolean | addAll (Collection<? extends E > collection) |
void | clear () |
boolean | contains (Object object) |
boolean | containsAll (Collection<?> collection) |
boolean | equals (Object object) |
int | hashCode () |
boolean | isEmpty () |
Iterator< E > | iterator () |
boolean | remove (Object object) |
boolean | removeAll (Collection<?> collection) |
boolean | retainAll (Collection<?> collection) |
int | size () |
Object [] | toArray () |
A
is a data structure which does not allow duplicate elements.
boolean java.util.Set< E >.add | ( | E | object | ) |
Adds the specified object to this set. The set is not modified if it already contains the object.
object | the object to add. |
UnsupportedOperationException | when adding to this set is not supported. |
ClassCastException | when the class of the object is inappropriate for this set. |
IllegalArgumentException | when the object cannot be added to this set. |
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
boolean java.util.Set< E >.addAll | ( | Collection<? extends E > | collection | ) |
Adds the objects in the specified collection which do not exist yet in this set.
collection | the collection of objects. |
UnsupportedOperationException | when adding to this set is not supported. |
ClassCastException | when the class of an object is inappropriate for this set. |
IllegalArgumentException | when an object cannot be added to this set. |
Implements java.util.Collection< E >.
void java.util.Set< E >.clear | ( | ) |
Removes all elements from this set, leaving it empty.
UnsupportedOperationException | when removing from this set is not supported. |
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
boolean java.util.Set< E >.contains | ( | Object | object | ) |
Searches this set for the specified object.
object | the object to search for. |
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
boolean java.util.Set< E >.containsAll | ( | Collection<?> | collection | ) |
Searches this set for all objects in the specified collection.
collection | the collection of objects. |
Implements java.util.Collection< E >.
boolean java.util.Set< E >.equals | ( | Object | object | ) |
Compares the specified object to this set, and returns true if they represent the same object using a class specific comparison. Equality for a set means that both sets have the same size and the same elements.
object | the object to compare with this object. |
Implements java.util.Collection< E >.
Implemented in java.util.AbstractSet< E >.
int java.util.Set< E >.hashCode | ( | ) |
Returns the hash code for this set. Two set which are equal must return the same value.
Implements java.util.Collection< E >.
Implemented in java.util.AbstractSet< E >.
boolean java.util.Set< E >.isEmpty | ( | ) |
Returns true if this set has no elements.
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
Iterator<E> java.util.Set< E >.iterator | ( | ) |
Returns an iterator on the elements of this set. The elements are unordered.
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
boolean java.util.Set< E >.remove | ( | Object | object | ) |
Removes the specified object from this set.
object | the object to remove. |
UnsupportedOperationException | when removing from this set is not supported. |
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
boolean java.util.Set< E >.removeAll | ( | Collection<?> | collection | ) |
Removes all objects in the specified collection from this set.
collection | the collection of objects to remove. |
UnsupportedOperationException | when removing from this set is not supported. |
Implements java.util.Collection< E >.
Implemented in java.util.AbstractSet< E >.
boolean java.util.Set< E >.retainAll | ( | Collection<?> | collection | ) |
Removes all objects from this set that are not contained in the specified collection.
collection | the collection of objects to retain. |
UnsupportedOperationException | when removing from this set is not supported. |
Implements java.util.Collection< E >.
int java.util.Set< E >.size | ( | ) |
Returns the number of elements in this set.
Implements java.util.Collection< E >.
Implemented in java.util.HashSet< E >.
Object [] java.util.Set< E >.toArray | ( | ) |
Returns an array containing all elements contained in this set.
Implements java.util.Collection< E >.