Class AbstractPatriciaTrie.AbstractRangeMap
java.lang.Object
java.util.AbstractMap<K,V>
org.apache.commons.collections4.trie.AbstractPatriciaTrie.AbstractRangeMap
- Direct Known Subclasses:
AbstractPatriciaTrie.PrefixRangeMap,AbstractPatriciaTrie.RangeEntryMap
- Enclosing class:
AbstractPatriciaTrie<K,V>
private abstract class AbstractPatriciaTrie.AbstractRangeMap
extends AbstractMap<K,V>
implements SortedMap<K,V>
A range view of the
Trie.-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionComparator<? super K> booleancontainsKey(Object key) Creates and returns anentrySet()view of theAbstractPatriciaTrie<K,.V>.AbstractRangeMap createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) Creates and returns a sub-range view of the currentAbstractPatriciaTrie<K,.V>.AbstractRangeMap entrySet()protected abstract KGets the FROM Key.protected abstract KgetToKey()Gets the TO Key.protected booleaninFromRange(K key, boolean forceInclusive) Returns true if the provided key is in the FROM range of theAbstractPatriciaTrie<K,.V>.AbstractRangeMap protected booleanReturns true if the provided key is greater than TO and less than FROM.protected booleanThis form allows the high endpoint (as well as all legit keys).protected booleanReturns true if the provided key is in the TO range of theAbstractPatriciaTrie<K,.V>.AbstractRangeMap protected abstract booleanTests whether or not thegetFromKey()is in the range.protected abstract booleanTests whether or not thegetToKey()is in the range.Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size
-
Field Details
-
entrySet
TheentrySet()view.
-
-
Constructor Details
-
AbstractRangeMap
private AbstractRangeMap()
-
-
Method Details
-
comparator
- Specified by:
comparatorin interfaceSortedMap<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
createEntrySet
Creates and returns anentrySet()view of theAbstractPatriciaTrie<K,.V>.AbstractRangeMap -
createRangeMap
protected abstract SortedMap<K,V> createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) Creates and returns a sub-range view of the currentAbstractPatriciaTrie<K,.V>.AbstractRangeMap -
entrySet
-
get
-
getFromKey
Gets the FROM Key. -
getToKey
Gets the TO Key. -
headMap
-
inFromRange
Returns true if the provided key is in the FROM range of theAbstractPatriciaTrie<K,.V>.AbstractRangeMap -
inRange
Returns true if the provided key is greater than TO and less than FROM. -
inRange2
This form allows the high endpoint (as well as all legit keys). -
inToRange
Returns true if the provided key is in the TO range of theAbstractPatriciaTrie<K,.V>.AbstractRangeMap -
isFromInclusive
protected abstract boolean isFromInclusive()Tests whether or not thegetFromKey()is in the range.- Returns:
- whether or not the
getFromKey()is in the range.
-
isToInclusive
protected abstract boolean isToInclusive()Tests whether or not thegetToKey()is in the range.- Returns:
- whether or not the
getToKey()is in the range.
-
put
-
remove
-
subMap
-
tailMap
-