protected class SafeSortedMap.ViewMap extends AbstractMap implements SortedMap
For example, a ViewMap defined on an SafeSortedMap of Integer keys with lower bound 3 and upper bound 7 would contain any keys in the underlying SafeSortedMap in the range [3, 7).
Modifier and Type | Class and Description |
---|---|
protected class |
SafeSortedMap.ViewMap.EntryIterator
An Iterator over the Entries backed by this ViewMap.
|
protected class |
SafeSortedMap.ViewMap.EntrySet
A Set of Entries backed by this ViewMap.
|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
protected Object |
m_oKeyLower
The key that this ViewMap is (inclusively) lower-bounded by, or null
for no lower-bound.
|
protected Object |
m_oKeyUpper
The key that this ViewMap is (exclusively) upper-bounded by, or null
for no upper-bound
|
Modifier | Constructor and Description |
---|---|
protected |
ViewMap(Object oKeyLower,
Object oKeyUpper)
Create a new ViewMap over the SafeSortedMap bounded by the specified
keys, or null for no-bound.
|
Modifier and Type | Method and Description |
---|---|
Comparator |
comparator() |
boolean |
containsKey(Object oKey) |
Set |
entrySet() |
Object |
firstKey() |
protected SafeSortedMap.EntryNode |
firstNode()
Return the first Node in this ViewMap, or null if there are none.
|
Object |
get(Object oKey) |
protected Object |
getLowerBound()
Return the lower bound of this ViewMap.
|
protected Object |
getUpperBound()
Return the upper bound of this ViewMap.
|
SortedMap |
headMap(Object toKey) |
protected boolean |
inRange(Object oKey)
Is the specified key in the range represented by this ViewMap?
|
Object |
lastKey() |
protected SafeSortedMap.EntryNode |
lastNode()
Return the last SkipNode in this ViewMap, or null if there are none.
|
Object |
put(Object oKey,
Object oValue) |
Object |
remove(Object oKey) |
SortedMap |
subMap(Object fromKey,
Object toKey) |
SortedMap |
tailMap(Object fromKey) |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsValue, equals, forEach, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size
protected final Object m_oKeyLower
protected final Object m_oKeyUpper
public Set entrySet()
public Object put(Object oKey, Object oValue)
put
in interface Map
put
in class AbstractMap
public Object get(Object oKey)
get
in interface Map
get
in class AbstractMap
public boolean containsKey(Object oKey)
containsKey
in interface Map
containsKey
in class AbstractMap
public Object remove(Object oKey)
remove
in interface Map
remove
in class AbstractMap
public Comparator comparator()
comparator
in interface SortedMap
protected Object getLowerBound()
protected Object getUpperBound()
protected boolean inRange(Object oKey)
oKey
- the key to test forprotected SafeSortedMap.EntryNode firstNode()
protected SafeSortedMap.EntryNode lastNode()