Package java.util
Class TreeMap

Public Method clear

void clear()

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

This method removes all mappings from this TreeMap.

Example

   TreeMap treeMap = new TreeMap();
   treeMap.put("1", "T");
   treeMap.put("2", "r");
   treeMap.put("3", "e");
   treeMap.put("4", "e");
   treeMap.put("5", "M");
   treeMap.put("6", "a");
   treeMap.put("7", "p");
   Logger.log("TreeMap: " + treeMap);

   treeMap.clear();
   Logger.log("TreeMap: " + treeMap);

The example above removes all mappings after creation, and writes the result to the logger.