Class HashSet

java.lang.Object
   |
   +----HashSet

public class HashSet
extends Object
Simple implementation of a set.


Constructor Index

 o HashSet()
get the number of objects contained in the set.

Method Index

 o add(Object)
Add an object to the set.
 o remove(Object)
Remove an object from the set.

Constructors

 o HashSet
 public HashSet()
get the number of objects contained in the set.

Methods

 o 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.

 o 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.