| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  |
  +--weiss.util.MapImpl
        |
        +--weiss.util.TreeMap
Balanced search tree implementation of the Map.
| Inner classes inherited from class weiss.util.Map | 
Map.Entry | 
| Constructor Summary | |
TreeMap()
Construct an empty TreeMap with default comparator.  | 
|
TreeMap(Comparator comparator)
Construct a TreeMap using comparator.  | 
|
TreeMap(Map other)
Construct a TreeMap with same key/value pairs and comparator as another map..  | 
|
| Method Summary | |
 void | 
clear()
Removes all key value pairs from the map.  | 
protected  Set | 
clonePairSet(Set pairSet)
 | 
 Comparator | 
comparator()
Gets the comparator; returns null if default.  | 
 boolean | 
containsKey(java.lang.Object key)
Tests if this map contains a given key.  | 
 Set | 
entrySet()
Return a set of Map.Entry objects corresponding to the key/value pairs in the map.  | 
 java.lang.Object | 
get(java.lang.Object key)
Returns the value in the map associated with the key.  | 
protected  Set | 
getSet()
Return a reference to the underlying set.  | 
 boolean | 
isEmpty()
Tests if this map is empty.  | 
 Set | 
keySet()
Returns the keys in the map.  | 
protected  Set | 
makeEmptyKeySet()
 | 
protected  Map.Entry | 
makePair(java.lang.Object key,
         java.lang.Object value)
 | 
 java.lang.Object | 
put(java.lang.Object key,
    java.lang.Object value)
Adds the key value pair to the map, overriding the original value if the key was already present.  | 
 java.lang.Object | 
remove(java.lang.Object key)
Remove the key and its value from the map.  | 
 int | 
size()
Returns the number of keys in this map.  | 
 Collection | 
values()
Returns the values in the map.  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public TreeMap()
public TreeMap(Comparator comparator)
cmp - the comparator.public TreeMap(Map other)
other - the other map.| Method Detail | 
public Comparator comparator()
protected Map.Entry makePair(java.lang.Object key,
                             java.lang.Object value)
makePair in class weiss.util.MapImplprotected Set makeEmptyKeySet()
makeEmptyKeySet in class weiss.util.MapImplprotected Set clonePairSet(Set pairSet)
clonePairSet in class weiss.util.MapImplpublic int size()
size in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic boolean containsKey(java.lang.Object key)
containsKey in interface Mapkey - the key to search for.public java.lang.Object get(java.lang.Object key)
get in interface Mapkey - the key to search for.
public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
put in interface Mapkey - the key to insert.value - the value to insert.public java.lang.Object remove(java.lang.Object key)
remove in interface Mapkey - the key to remove.public void clear()
clear in interface Mappublic Set keySet()
keySet in interface Mappublic Collection values()
values in interface Mappublic Set entrySet()
entrySet in interface Mapprotected Set getSet()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||