java.util.TreeSet

java.util.TreeSet is a non-synchronized Java Collection Framework class, backed by a TreeMap instance, which maintains objects in key sort order.

java.util.TreeSet 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

java.util.TreeSet objects are ideal for applications that require relatively quick addition and deletion of objects, but do not require random access of the objects.

The TreeSet 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 java.util.TreeSet 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.HashSet