Class AbstractPatriciaTrie.RangeMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.apache.commons.collections4.trie.AbstractPatriciaTrie.RangeMap
-
- All Implemented Interfaces:
java.util.Map<K,V>,java.util.SortedMap<K,V>
- Direct Known Subclasses:
AbstractPatriciaTrie.PrefixRangeMap,AbstractPatriciaTrie.RangeEntryMap
- Enclosing class:
- AbstractPatriciaTrie<K,V>
private abstract class AbstractPatriciaTrie.RangeMap extends java.util.AbstractMap<K,V> implements java.util.SortedMap<K,V>A range view of theTrie.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<java.util.Map.Entry<K,V>>entrySetTheentrySet()view.
-
Constructor Summary
Constructors Modifier Constructor Description privateRangeMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.Comparator<? super K>comparator()booleancontainsKey(java.lang.Object key)protected abstract java.util.Set<java.util.Map.Entry<K,V>>createEntrySet()Creates and returns anentrySet()view of theAbstractPatriciaTrie.RangeMap.protected abstract java.util.SortedMap<K,V>createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)Creates and returns a sub-range view of the currentAbstractPatriciaTrie.RangeMap.java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)protected abstract KgetFromKey()Returns the FROM Key.protected abstract KgetToKey()Returns the TO Key.java.util.SortedMap<K,V>headMap(K toKey)protected booleaninFromRange(K key, boolean forceInclusive)Returns true if the provided key is in the FROM range of theAbstractPatriciaTrie.RangeMap.protected booleaninRange(K key)Returns true if the provided key is greater than TO and less than FROM.protected booleaninRange2(K key)This form allows the high endpoint (as well as all legit keys).protected booleaninToRange(K key, boolean forceInclusive)Returns true if the provided key is in the TO range of theAbstractPatriciaTrie.RangeMap.protected abstract booleanisFromInclusive()Whether or not thegetFromKey()is in the range.protected abstract booleanisToInclusive()Whether or not thegetToKey()is in the range.Vput(K key, V value)Vremove(java.lang.Object key)java.util.SortedMap<K,V>subMap(K fromKey, K toKey)java.util.SortedMap<K,V>tailMap(K fromKey)-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
entrySet
private transient volatile java.util.Set<java.util.Map.Entry<K,V>> entrySet
TheentrySet()view.
-
-
Method Detail
-
createEntrySet
protected abstract java.util.Set<java.util.Map.Entry<K,V>> createEntrySet()
Creates and returns anentrySet()view of theAbstractPatriciaTrie.RangeMap.
-
getFromKey
protected abstract K getFromKey()
Returns the FROM Key.
-
isFromInclusive
protected abstract boolean isFromInclusive()
Whether or not thegetFromKey()is in the range.
-
getToKey
protected abstract K getToKey()
Returns the TO Key.
-
isToInclusive
protected abstract boolean isToInclusive()
Whether or not thegetToKey()is in the range.
-
comparator
public java.util.Comparator<? super K> comparator()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
remove
public V remove(java.lang.Object key)
-
get
public V get(java.lang.Object key)
-
inRange
protected boolean inRange(K key)
Returns true if the provided key is greater than TO and less than FROM.
-
inRange2
protected boolean inRange2(K key)
This form allows the high endpoint (as well as all legit keys).
-
inFromRange
protected boolean inFromRange(K key, boolean forceInclusive)
Returns true if the provided key is in the FROM range of theAbstractPatriciaTrie.RangeMap.
-
inToRange
protected boolean inToRange(K key, boolean forceInclusive)
Returns true if the provided key is in the TO range of theAbstractPatriciaTrie.RangeMap.
-
createRangeMap
protected abstract java.util.SortedMap<K,V> createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
Creates and returns a sub-range view of the currentAbstractPatriciaTrie.RangeMap.
-
-