Package java.util
Class TreeMap
boolean containsKey(Object key)
Overrides:
_INSERT_METHOD_SIGNATURE_HERE_
Description:
Returns true if this map contains a mapping for the specified key.
Example
TreeMap treeMap1 = new TreeMap();
treeMap1.put("1", "T");
treeMap1.put("2", "r");
treeMap1.put("3", "e");
treeMap1.put("4", "e");
treeMap1.put("5", "M");
treeMap1.put("6", "a");
treeMap1.put("7", "p");
if (treeMap.containsKey("2"))
Logger.log("This treeMap contains the key 2");
The example above prints the result to the logger if the treeMap contains the key string 2.