private class PatriciaTrie.SubMap extends AbstractMap<K,V> implements SortedMap<K,V>, Serializable
Modifier and Type | Class and Description |
---|---|
(package private) class |
PatriciaTrie.SubMap.EntrySetView |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
private Set<Map.Entry<K,V>> |
entrySet |
protected boolean |
fromInclusive
Whether or not the 'from' is inclusive.
|
protected K |
fromKey
The key to start from, null if the beginning.
|
protected boolean |
toInclusive
Whether or not the 'to' is inclusive.
|
protected K |
toKey
The key to end at, null if till the end.
|
Modifier | Constructor and Description |
---|---|
protected |
SubMap()
Constructs a blank SubMap -- this should ONLY be used
by subclasses that wish to lazily construct their
fromKey or toKey
|
(package private) |
SubMap(K fromKey,
K toKey) |
Modifier and Type | Method and Description |
---|---|
Comparator<? super K> |
comparator() |
boolean |
containsKey(Object key) |
Set<Map.Entry<K,V>> |
entrySet() |
K |
firstKey() |
V |
get(Object key) |
SortedMap<K,V> |
headMap(K toKey) |
protected boolean |
inFromRange(K key,
boolean forceInclusive) |
protected boolean |
inRange(K key) |
protected boolean |
inRange2(K key) |
protected boolean |
inToRange(K key,
boolean forceInclusive) |
boolean |
isEmpty() |
K |
lastKey() |
protected Set<Map.Entry<K,V>> |
newSubMapEntrySet() |
V |
put(K key,
V value) |
V |
remove(Object key) |
SortedMap<K,V> |
subMap(K fromKey,
K toKey) |
SortedMap<K,V> |
tailMap(K fromKey) |
clear, clone, containsValue, equals, hashCode, keySet, putAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size
protected boolean fromInclusive
protected boolean toInclusive
protected SubMap()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public Comparator<? super K> comparator()
comparator
in interface SortedMap<K,V>
protected Set<Map.Entry<K,V>> newSubMapEntrySet()
protected boolean inFromRange(K key, boolean forceInclusive)