edu.wisc.ssec.mcidasv.util.trie
Class PatriciaTrie.PrefixSubMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by edu.wisc.ssec.mcidasv.util.trie.PatriciaTrie.SubMap
          extended by edu.wisc.ssec.mcidasv.util.trie.PatriciaTrie.PrefixSubMap
All Implemented Interfaces:
Serializable, Map<K,V>, SortedMap<K,V>
Enclosing class:
PatriciaTrie<K,V>

private class PatriciaTrie.PrefixSubMap
extends PatriciaTrie.SubMap

A submap used for prefix views over the Trie.


Nested Class Summary
private  class PatriciaTrie.PrefixSubMap.PrefixEntrySetView
           
 
Nested classes/interfaces inherited from class edu.wisc.ssec.mcidasv.util.trie.PatriciaTrie.SubMap
PatriciaTrie.SubMap.EntrySetView
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
private  int keyModCount
           
protected  int length
           
protected  int offset
           
protected  K prefix
           
protected  int size
           
 
Fields inherited from class edu.wisc.ssec.mcidasv.util.trie.PatriciaTrie.SubMap
fromInclusive, fromKey, toInclusive, toKey
 
Constructor Summary
PatriciaTrie.PrefixSubMap(K prefix, int offset, int length)
           
 
Method Summary
 K firstKey()
           
private  void fixup()
           
protected  boolean inFromRange(K key, boolean forceInclusive)
           
protected  boolean inRange(K key)
           
protected  boolean inRange2(K key)
           
protected  boolean inToRange(K key, boolean forceInclusive)
           
 K lastKey()
           
protected  Set<Map.Entry<K,V>> newSubMapEntrySet()
           
 
Methods inherited from class edu.wisc.ssec.mcidasv.util.trie.PatriciaTrie.SubMap
comparator, containsKey, entrySet, get, headMap, isEmpty, put, remove, subMap, tailMap
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, keySet, putAll, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.SortedMap
keySet, values
 
Methods inherited from interface java.util.Map
clear, containsValue, equals, hashCode, putAll, size
 

Field Detail

prefix

protected final K prefix

offset

protected final int offset

length

protected final int length

keyModCount

private transient int keyModCount

size

protected int size
Constructor Detail

PatriciaTrie.PrefixSubMap

PatriciaTrie.PrefixSubMap(K prefix,
                          int offset,
                          int length)
Method Detail

firstKey

public K firstKey()
Specified by:
firstKey in interface SortedMap<K,V>
Overrides:
firstKey in class PatriciaTrie.SubMap

lastKey

public K lastKey()
Specified by:
lastKey in interface SortedMap<K,V>
Overrides:
lastKey in class PatriciaTrie.SubMap

inRange

protected boolean inRange(K key)
Overrides:
inRange in class PatriciaTrie.SubMap

inRange2

protected boolean inRange2(K key)
Overrides:
inRange2 in class PatriciaTrie.SubMap

inToRange

protected boolean inToRange(K key,
                            boolean forceInclusive)
Overrides:
inToRange in class PatriciaTrie.SubMap

inFromRange

protected boolean inFromRange(K key,
                              boolean forceInclusive)
Overrides:
inFromRange in class PatriciaTrie.SubMap

fixup

private void fixup()

newSubMapEntrySet

protected Set<Map.Entry<K,V>> newSubMapEntrySet()
Overrides:
newSubMapEntrySet in class PatriciaTrie.SubMap