Package java.util
Class TreeSet

Public Method clear

void clear()

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Removes all of the elements from this set. Implements interface method Set.clear.

Example

   TreeSet set = new TreeSet();
   set.add("value1");
   set.add("value2");

   Logger.log("set: " + set);
   set.clear();
   Logger.log("set: " + set);

The example above creates a new tree set and adds values to the set. Afterwards, the set is cleard.