java.util.HashSet

java.util.HashSet is a non-synchronized Java Collection Framework class that is backed by a HashMap instance. The HashMap instance creates a hash key of each object to produce an unique key. Objects in this collection are not maintained in any type of sort order.

java.util.HashSet implements the Set interface from the Java Collection Framework. Use this class for quickly inserting and removing objects, when random access of the objects is not required.

Hints

The HashSet class does not support random access of objects. It is also not suitable for applications that need to iterate through a large number of objects.

If your application is utilizing a high amount of CPU time when iterating through a HashSet object, try using either a java.util.Vector or java.util.ArrayList object.

Related Topics:

java.util.ArrayList

java.util.LinkedList

java.util.Vector

java.util.TreeSet