stella.util
Class LengthTreeMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap
          extended by stella.util.LengthTreeMap
All Implemented Interfaces:
Serializable, Cloneable, Map, NavigableMap, SortedMap

public class LengthTreeMap
extends TreeMap

A tree map used for mapping variable names to values. To allow a distinction between two names where one is the starting part of another variable this map is ordered for decreasing variable length. An example would be two variables apple and appletree. In this map, iterating over the keys will retrive appletree prior to apple making the correct treatment of such ambigouse cases easy.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
LengthTreeMap()
          Constructs an empty map with guaranteed ordering of the keys to their length.
 
Method Summary
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

LengthTreeMap

public LengthTreeMap()
Constructs an empty map with guaranteed ordering of the keys to their length. Only Strings are allowed as keys.