private abstract class AbstractPatriciaTrie.RangeMap
extends java.util.AbstractMap<K,V>
implements java.util.SortedMap<K,V>
Trie
.Modifier and Type | Field and Description |
---|---|
private java.util.Set<java.util.Map.Entry<K,V>> |
entrySet
The
entrySet() view. |
Modifier | Constructor and Description |
---|---|
private |
RangeMap() |
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<? super K> |
comparator() |
boolean |
containsKey(java.lang.Object key) |
protected abstract java.util.Set<java.util.Map.Entry<K,V>> |
createEntrySet()
Creates and returns an
entrySet() view of the AbstractPatriciaTrie.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 current
AbstractPatriciaTrie.RangeMap . |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
protected abstract K |
getFromKey()
Returns the FROM Key.
|
protected abstract K |
getToKey()
Returns the TO Key.
|
java.util.SortedMap<K,V> |
headMap(K toKey) |
protected boolean |
inFromRange(K key,
boolean forceInclusive)
Returns true if the provided key is in the FROM range of the
AbstractPatriciaTrie.RangeMap . |
protected boolean |
inRange(K key)
Returns true if the provided key is greater than TO and less than FROM.
|
protected boolean |
inRange2(K key)
This form allows the high endpoint (as well as all legit keys).
|
protected boolean |
inToRange(K key,
boolean forceInclusive)
Returns true if the provided key is in the TO range of the
AbstractPatriciaTrie.RangeMap . |
protected abstract boolean |
isFromInclusive()
Whether or not the
getFromKey() is in the range. |
protected abstract boolean |
isToInclusive()
Whether or not the
getToKey() is in the range. |
V |
put(K key,
V value) |
V |
remove(java.lang.Object key) |
java.util.SortedMap<K,V> |
subMap(K fromKey,
K toKey) |
java.util.SortedMap<K,V> |
tailMap(K fromKey) |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
private transient volatile java.util.Set<java.util.Map.Entry<K,V>> entrySet
entrySet()
view.protected abstract java.util.Set<java.util.Map.Entry<K,V>> createEntrySet()
entrySet()
view of the AbstractPatriciaTrie.RangeMap
.protected abstract K getFromKey()
protected abstract boolean isFromInclusive()
getFromKey()
is in the range.protected abstract K getToKey()
protected abstract boolean isToInclusive()
getToKey()
is in the range.public java.util.Comparator<? super K> comparator()
public boolean containsKey(java.lang.Object key)
public V remove(java.lang.Object key)
public V get(java.lang.Object key)
protected boolean inRange(K key)
protected boolean inRange2(K key)
protected boolean inFromRange(K key, boolean forceInclusive)
AbstractPatriciaTrie.RangeMap
.protected boolean inToRange(K key, boolean forceInclusive)
AbstractPatriciaTrie.RangeMap
.protected abstract java.util.SortedMap<K,V> createRangeMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
AbstractPatriciaTrie.RangeMap
.