Warning
The methods of ForwardingNavigableMap forward indiscriminately
to the methods of the delegate. For example, overriding put alone will not change
the behavior of putAll, which can lead to unexpected behavior. In this case, you should
override putAll as well, either providing your own implementation, or delegating to the
provided standardPutAll method.
default method warning: This class does not forward calls to default methods. Instead, it inherits their default implementations. When those implementations
invoke methods, they invoke methods on the ForwardingNavigableMap.
Each of the standard methods uses the map's comparator (or the natural ordering of the
elements, if there is no comparator) to test element equality. As a result, if the comparator is
not consistent with equals, some of the standard implementations may violate the Map
contract.
The standard methods and the collection views they return are not guaranteed to be
thread-safe, even when all of the methods that they depend on are thread-safe.
| Modifier and Type | Class and Description |
|---|---|
| protected class | ForwardingNavigableMap.StandardDescendingMap
A sensible implementation of |
| protected class | ForwardingNavigableMap.StandardNavigableKeySet
A sensible implementation of |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Map. | ceilingEntry(K
the key key)Implements java. null if
there is no such key.
|
| public K | ceilingKey(K
the key key)Implements java. null if there is no such key.
|
| protected abstract NavigableMap | delegate()
Implements abstract com. |
| public NavigableSet | descendingKeySet()
Implements java. NavigableSet view of the keys contained in this map.
|
| public NavigableMap | descendingMap()
Implements java. |
| public Map. | firstEntry()
Overrides default java. Implements java. null if the map is empty.
|
| public Map. | floorEntry(K
the key key)Implements java. null if there
is no such key.
|
| public K | floorKey(K
the key key)Implements java. null if there is no such key.
|
| public NavigableMap | headMap(K
high endpoint of the keys in the returned map toKey, boolean true if the high endpoint
is to be included in the returned viewImplements java. inclusive is true) toKey.
|
| public Map. | higherEntry(K
the key key)Implements java. null if there
is no such key.
|
| public K | higherKey(K
the key key)Implements java. null if there is no such key.
|
| public Map. | lastEntry()
Overrides default java. Implements java. null if the map is empty.
|
| public Map. | lowerEntry(K
the key key)Implements java. null if there is
no such key.
|
| public K | lowerKey(K
the key key)Implements java. null if there is no such key.
|
| public NavigableSet | navigableKeySet()
Implements java. NavigableSet view of the keys contained in this map.
|
| public Map. | pollFirstEntry()
Overrides default java. Implements java. null if the map is empty.
|
| public Map. | pollLastEntry()
Overrides default java. Implements java. null if the map is empty.
|
| protected Map. | standardCeilingEntry(K key)
A sensible definition of |
| protected K | |
| protected NavigableSet | standardDescendingKeySet()
A sensible definition of |
| protected Map. | |
| protected K | |
| protected Map. | standardFloorEntry(K key)
A sensible definition of |
| protected K | |
| protected SortedMap | standardHeadMap(K toKey)
A sensible definition of |
| protected Map. | standardHigherEntry(K key)
A sensible definition of |
| protected K | |
| protected Map. | standardLastEntry()
A sensible definition of |
| protected K | |
| protected Map. | standardLowerEntry(K key)
A sensible definition of |
| protected K | |
| protected Map. | standardPollFirstEntry()
A sensible definition of |
| protected Map. | standardPollLastEntry()
A sensible definition of |
| protected SortedMap | standardSubMap(K fromKey, K toKey)
Overrides com. subMap(Object, Object) in terms of subMap(Object,
boolean, Object, boolean).
|
| protected SortedMap | standardTailMap(K fromKey)
A sensible definition of |
| public NavigableMap | subMap(K
low endpoint of the keys in the returned map fromKey, boolean true if the low endpoint
is to be included in the returned viewhigh endpoint of the keys in the returned map toKey, boolean true if the high endpoint
is to be included in the returned viewImplements java. fromKey to toKey.
|
| public NavigableMap | tailMap(K
low endpoint of the keys in the returned map fromKey, boolean true if the low endpoint
is to be included in the returned viewImplements java. inclusive is true) fromKey.
|
| ForwardingNavigableMap | back to summary |
|---|---|
| protected ForwardingNavigableMap() Constructor for use by subclasses. | |
| ceilingEntry | back to summary |
|---|---|
| public Map. Implements java. Doc from java. Returns a key-value mapping associated with the least key
greater than or equal to the given key, or | |
| ceilingKey | back to summary |
|---|---|
| public K ceilingKey(K key) Implements java. Doc from java. Returns the least key greater than or equal to the given key,
or
| |
| delegate | back to summary |
|---|---|
| protected abstract NavigableMap Implements abstract com. Doc from com. Returns the backing delegate instance that methods are forwarded to. Abstract subclasses
generally override this method with an abstract method that has a more specific return type,
such as
| |
| descendingKeySet | back to summary |
|---|---|
| public NavigableSet Implements java. Doc from java. Returns a reverse order
| |
| descendingMap | back to summary |
|---|---|
| public NavigableMap Implements java. Doc from java. Returns a reverse order view of the mappings contained in this map.
The descending map is backed by this map, so changes to the map are
reflected in the descending map, and vice-versa. If either map is
modified while an iteration over a collection view of either map
is in progress (except through the iterator's own The returned map has an ordering equivalent to
| |
| firstEntry | back to summary |
|---|---|
| public Map. Overrides default java. Implements java. Doc from java. Returns a key-value mapping associated with the least
key in this map, or | |
| floorEntry | back to summary |
|---|---|
| public Map. Implements java. Doc from java. Returns a key-value mapping associated with the greatest key
less than or equal to the given key, or | |
| floorKey | back to summary |
|---|---|
| public K floorKey(K key) Implements java. Doc from java. Returns the greatest key less than or equal to the given key,
or
| |
| headMap | back to summary |
|---|---|
| public NavigableMap Implements java. Doc from java. Returns a view of the portion of this map whose keys are less than (or
equal to, if The returned map will throw an
| |
| higherEntry | back to summary |
|---|---|
| public Map. Implements java. Doc from java. Returns a key-value mapping associated with the least key
strictly greater than the given key, or | |
| higherKey | back to summary |
|---|---|
| public K higherKey(K key) Implements java. Doc from java. Returns the least key strictly greater than the given key, or
| |
| lastEntry | back to summary |
|---|---|
| public Map. Overrides default java. Implements java. Doc from java. Returns a key-value mapping associated with the greatest
key in this map, or | |
| lowerEntry | back to summary |
|---|---|
| public Map. Implements java. Doc from java. Returns a key-value mapping associated with the greatest key
strictly less than the given key, or | |
| lowerKey | back to summary |
|---|---|
| public K lowerKey(K key) Implements java. Doc from java. Returns the greatest key strictly less than the given key, or
| |
| navigableKeySet | back to summary |
|---|---|
| public NavigableSet Implements java. Doc from java. Returns a
| |
| pollFirstEntry | back to summary |
|---|---|
| public Map. Overrides default java. Implements java. Doc from java. Removes and returns a key-value mapping associated with
the least key in this map, or | |
| pollLastEntry | back to summary |
|---|---|
| public Map. Overrides default java. Implements java. Doc from java. Removes and returns a key-value mapping associated with
the greatest key in this map, or | |
| standardCeilingEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardCeilingKey | back to summary |
|---|---|
| protected K standardCeilingKey(K key) A sensible definition of
| |
| standardDescendingKeySet | back to summary |
|---|---|
| protected NavigableSet A sensible definition of | |
| standardFirstEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardFirstKey | back to summary |
|---|---|
| protected K standardFirstKey() A sensible definition of | |
| standardFloorEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardFloorKey | back to summary |
|---|---|
| protected K standardFloorKey(K key) A sensible definition of
| |
| standardHeadMap | back to summary |
|---|---|
| protected SortedMap A sensible definition of | |
| standardHigherEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardHigherKey | back to summary |
|---|---|
| protected K standardHigherKey(K key) A sensible definition of
| |
| standardLastEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardLastKey | back to summary |
|---|---|
| protected K standardLastKey() A sensible definition of | |
| standardLowerEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardLowerKey | back to summary |
|---|---|
| protected K standardLowerKey(K key) A sensible definition of
| |
| standardPollFirstEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardPollLastEntry | back to summary |
|---|---|
| protected Map. A sensible definition of
| |
| standardSubMap | back to summary |
|---|---|
| protected SortedMap Overrides com. A sensible definition of
| |
| standardTailMap | back to summary |
|---|---|
| protected SortedMap A sensible definition of | |
| subMap | back to summary |
|---|---|
| public NavigableMap Implements java. Doc from java. Returns a view of the portion of this map whose keys range from
The returned map will throw an
| |
| tailMap | back to summary |
|---|---|
| public NavigableMap Implements java. Doc from java. Returns a view of the portion of this map whose keys are greater than (or
equal to, if The returned map will throw an
| |
NavigableMap#descendingMap in terms of the methods of this
NavigableMap. In many cases, you may wish to override ForwardingNavigableMap#descendingMap to forward to this implementation or a subclass thereof.
In particular, this map iterates over entries with repeated calls to NavigableMap#lowerEntry. If a more efficient means of iteration is available, you may wish to
override the entryIterator() method of this class.