Class HashSet
java.lang.Object
|
+----HashSet
- public class HashSet
- extends Object
Simple implementation of a set.
-
HashSet()
- get the number of objects contained in the set.
-
add(Object)
- Add an object to the set.
-
remove(Object)
- Remove an object from the set.
HashSet
public HashSet()
- get the number of objects contained in the set.
add
public synchronized boolean add(Object o)
- Add an object to the set. If the object already exists within the set
it is not added and add() returns false. Otherwise it is added and
the result is true.
remove
public synchronized boolean remove(Object element)
- Remove an object from the set. If the object could be removed
this method returns true, otherwise false.