package saker.util
public abstract class TransformingNavigableMap<MK, MV, K, V> extends TransformingSortedMap<MK, MV, K, V> implements NavigableMap<K, V>
saker.util.TransformingNavigableMap<MK, MV, K, V>
saker.util.TransformingSortedMap<MK, MV, K, V>
saker.util.TransformingMap<MK, MV, K, V>
java.util.SortedMap<K, V>
java.util.NavigableMap<K, V>
Pseudo-Map implementation that dynamically generates the entries for it based on the entries of a subject
map.
Works exactly the same way as TransformingSortedMap, but also implements NavigableSet as well.
MKThe key type of the source map.
MVThe value type of the source map.
KThe key type of this map.
VThe value type of this map.
public | TransformingNavigableMap( Creates a new instance with the given map. |
public | TransformingNavigableMap( Creates a new instance with the given map and comparator. |
public Entry< | ceilingEntry( Returns a key-value mapping associated with the least key
greater than or equal to the given key, or null if
there is no such key. |
public K | ceilingKey( Returns the least key greater than or equal to the given key,
or null if there is no such key. |
public NavigableSet< | Returns a reverse order NavigableSet view of the keys contained in this map. |
public NavigableMap< | Returns a reverse order view of the mappings contained in this map. |
public Entry< | Returns a key-value mapping associated with the least
key in this map, or null if the map is empty. |
public Entry< | floorEntry( Returns a key-value mapping associated with the greatest key
less than or equal to the given key, or null if there
is no such key. |
public K | floorKey( Returns the greatest key less than or equal to the given key,
or null if there is no such key. |
public NavigableMap< | headMap( Returns a view of the portion of this map whose keys are less than (or
equal to, if inclusive is true) toKey . |
public Entry< | higherEntry( Returns a key-value mapping associated with the least key
strictly greater than the given key, or null if there
is no such key. |
public K | higherKey( Returns the least key strictly greater than the given key, or
null if there is no such key. |
public Entry< | Returns a key-value mapping associated with the greatest
key in this map, or null if the map is empty. |
public Entry< | lowerEntry( Returns a key-value mapping associated with the greatest key
strictly less than the given key, or null if there is
no such key. |
public K | lowerKey( Returns the greatest key strictly less than the given key, or
null if there is no such key. |
public NavigableSet< | Returns a NavigableSet view of the keys contained in this map. |
public Entry< | Removes and returns a key-value mapping associated with
the least key in this map, or null if the map is empty. |
public Entry< | Removes and returns a key-value mapping associated with
the greatest key in this map, or null if the map is empty. |
public NavigableMap< | subMap( Returns a view of the portion of this map whose keys range from
fromKey to toKey . |
public NavigableMap< | tailMap( Returns a view of the portion of this map whose keys are greater than (or
equal to, if inclusive is true) fromKey . |
From: TransformingSortedMap< |
From: TransformingMap< |
From: SortedMap< |
From: AbstractMap< |
From: Map< |
From: Object |
Overridden from: NavigableMap
Returns a key-value mapping associated with the least key
greater than or equal to the given key, or
null
if
there is no such key.keythe key
an entry with the least key greater than or equal to
key
, or null
if there is no such keyOverridden from: NavigableMap
Returns the least key greater than or equal to the given key,
or
null
if there is no such key.keythe key
the least key greater than or equal to
key
,
or null
if there is no such keyOverridden from: NavigableMap
Returns a reverse order NavigableSet view of the keys contained in this map. The set's iterator returns the keys in descending order.
The set is backed by the map, so changes to the map are reflected in
the set, and vice-versa. If the map is modified while an iteration
over the set is in progress (except through the iterator's own
remove
operation), the results of the iteration are undefined. The
set supports element removal, which removes the corresponding mapping
from the map, via the Iterator.remove
, Set.remove
,
removeAll
, retainAll
, and clear
operations.
It does not support the add
or addAll
operations.a reverse order navigable set view of the keys in this map
Overridden from: NavigableMap
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
remove
operation), the results of the iteration are undefined.
The returned map has an ordering equivalent to
Collections.reverseOrder(comparator()).
The expression m.descendingMap().descendingMap()
returns a
view of m
essentially equivalent to m
.
a reverse order view of this map
Overridden from: NavigableMap
Returns a key-value mapping associated with the least
key in this map, or
null
if the map is empty.an entry with the least key,
or
null
if this map is emptyOverridden from: NavigableMap
Returns a key-value mapping associated with the greatest key
less than or equal to the given key, or
null
if there
is no such key.keythe key
an entry with the greatest key less than or equal to
key
, or null
if there is no such keyOverridden from: NavigableMap
Returns the greatest key less than or equal to the given key,
or
null
if there is no such key.keythe key
the greatest key less than or equal to
key
,
or null
if there is no such keyOverridden from: NavigableMap
Returns a view of the portion of this map whose keys are less than (or
equal to, if
inclusive
is true) toKey
. The returned
map is backed by this map, so changes in the returned map are reflected
in this map, and vice-versa. The returned map supports all optional
map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
toKeyhigh endpoint of the keys in the returned map
inclusive
true
if the high endpoint
is to be included in the returned viewa view of the portion of this map whose keys are less than
(or equal to, if
inclusive
is true) toKey
Overridden from: NavigableMap
Returns a key-value mapping associated with the least key
strictly greater than the given key, or
null
if there
is no such key.keythe key
an entry with the least key greater than
key
,
or null
if there is no such keyOverridden from: NavigableMap
Returns the least key strictly greater than the given key, or
null
if there is no such key.keythe key
the least key greater than
key
,
or null
if there is no such keyOverridden from: NavigableMap
Returns a key-value mapping associated with the greatest
key in this map, or
null
if the map is empty.an entry with the greatest key,
or
null
if this map is emptyOverridden from: NavigableMap
Returns a key-value mapping associated with the greatest key
strictly less than the given key, or
null
if there is
no such key.keythe key
an entry with the greatest key less than
key
,
or null
if there is no such keyOverridden from: NavigableMap
Returns the greatest key strictly less than the given key, or
null
if there is no such key.keythe key
the greatest key less than
key
,
or null
if there is no such keyOverridden from: NavigableMap
Removes and returns a key-value mapping associated with
the least key in this map, or
null
if the map is empty.the removed first entry of this map,
or
null
if this map is emptyOverridden from: NavigableMap
Removes and returns a key-value mapping associated with
the greatest key in this map, or
null
if the map is empty.the removed last entry of this map,
or
null
if this map is emptyOverridden from: NavigableMap
Returns a view of the portion of this map whose keys range from
fromKey
to toKey
. If fromKey
and
toKey
are equal, the returned map is empty unless
fromInclusive
and toInclusive
are both true. The
returned map is backed by this map, so changes in the returned map are
reflected in this map, and vice-versa. The returned map supports all
optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside of its range, or to construct a
submap either of whose endpoints lie outside its range.
fromKeylow endpoint of the keys in the returned map
fromInclusive
true
if the low endpoint
is to be included in the returned viewtoKeyhigh endpoint of the keys in the returned map
toInclusive
true
if the high endpoint
is to be included in the returned viewa view of the portion of this map whose keys range from
fromKey
to toKey
Overridden from: NavigableMap
Returns a view of the portion of this map whose keys are greater than (or
equal to, if
inclusive
is true) fromKey
. The returned
map is backed by this map, so changes in the returned map are reflected
in this map, and vice-versa. The returned map supports all optional
map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
fromKeylow endpoint of the keys in the returned map
inclusive
true
if the low endpoint
is to be included in the returned viewa view of the portion of this map whose keys are greater than
(or equal to, if
inclusive
is true) fromKey