public interface AtomicNavigableMap<K extends Comparable<K>,V> extends AtomicSortedMap<K,V>
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
AsyncAtomicNavigableMap<K,V> |
async()
Returns the underlying asynchronous primitive.
|
Map.Entry<K,Versioned<V>> |
ceilingEntry(K key)
Returns the entry associated with the least key greater than or equal to the key.
|
K |
ceilingKey(K key)
Returns the lowest key greater than or equal to key.
|
Map.Entry<K,Versioned<V>> |
firstEntry()
Returns the entry associated with the lowest key in the map.
|
Map.Entry<K,Versioned<V>> |
floorEntry(K key)
Returns the entry associated with the greatest key less than or equal to key.
|
K |
floorKey(K key)
Returns the entry associated with the highest key less than or equal to key.
|
default AtomicSortedMap<K,V> |
headMap(K toKey)
Returns a view of the portion of this map whose keys are strictly less than
toKey. |
AtomicNavigableMap<K,V> |
headMap(K toKey,
boolean inclusive)
Returns a view of the portion of this map whose keys are less than (or
equal to, if
inclusive is true) toKey. |
Map.Entry<K,Versioned<V>> |
higherEntry(K key)
Returns the entry associated with the lest key greater than key.
|
K |
higherKey(K key)
Returns the lowest key greater than key.
|
Map.Entry<K,Versioned<V>> |
lastEntry()
Returns the entry associated with the highest key in the map.
|
Map.Entry<K,Versioned<V>> |
lowerEntry(K key)
Returns the entry associated with the largest key less than key.
|
K |
lowerKey(K key)
Returns the entry associated with the greatest key less than key.
|
DistributedNavigableSet<K> |
navigableKeySet()
Returns a navigable set of the keys in this map.
|
Map.Entry<K,Versioned<V>> |
pollFirstEntry()
Returns the entry associated with the lowest key in the map.
|
Map.Entry<K,Versioned<V>> |
pollLastEntry()
Returns the entry associated with the highest key in the map.
|
AtomicNavigableMap<K,V> |
subMap(K fromKey,
boolean fromInclusive,
K toKey,
boolean toInclusive)
Returns a view of the portion of this map whose keys range from
fromKey to toKey. |
default AtomicSortedMap<K,V> |
subMap(K fromKey,
K toKey)
Returns a view of the portion of this map whose keys range from
fromKey, inclusive, to toKey,
exclusive. |
default AtomicSortedMap<K,V> |
tailMap(K fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to
fromKey. |
AtomicNavigableMap<K,V> |
tailMap(K fromKey,
boolean inclusive)
Returns a view of the portion of this map whose keys are greater than (or
equal to, if
inclusive is true) fromKey. |
firstKey, lastKeyaddListener, addListener, clear, compute, computeIf, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, get, getAllPresent, getOrDefault, isEmpty, keySet, put, put, putAndGet, putAndGet, putIfAbsent, putIfAbsent, remove, remove, remove, removeListener, replace, replace, replace, size, valuesclose, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typeMap.Entry<K,Versioned<V>> ceilingEntry(K key)
key - the keyMap.Entry<K,Versioned<V>> floorEntry(K key)
key - the keyMap.Entry<K,Versioned<V>> higherEntry(K key)
key - the keyMap.Entry<K,Versioned<V>> lowerEntry(K key)
key - the keyMap.Entry<K,Versioned<V>> firstEntry()
Map.Entry<K,Versioned<V>> lastEntry()
Map.Entry<K,Versioned<V>> pollFirstEntry()
Map.Entry<K,Versioned<V>> pollLastEntry()
K lowerKey(K key)
key - the keyK floorKey(K key)
key - the keyK ceilingKey(K key)
key - the keyK higherKey(K key)
key - the keyDistributedNavigableSet<K> navigableKeySet()
default AtomicSortedMap<K,V> subMap(K fromKey, K toKey)
AtomicSortedMapfromKey, inclusive, to toKey,
exclusive. (If fromKey and toKey are equal, the returned map is empty.) 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.
subMap in interface AtomicSortedMap<K extends Comparable<K>,V>fromKey - low endpoint (inclusive) of the keys in the returned maptoKey - high endpoint (exclusive) of the keys in the returned mapfromKey, inclusive, to toKey,
exclusiveAtomicNavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
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.
fromKey - low endpoint of the keys in the returned mapfromInclusive - true if the low endpoint
is to be included in the returned viewtoKey - high endpoint of the keys in the returned maptoInclusive - true if the high endpoint
is to be included in the returned viewfromKey to toKeyClassCastException - if fromKey and toKey
cannot be compared to one another using this map's comparator
(or, if the map has no comparator, using natural ordering).
Implementations may, but are not required to, throw this
exception if fromKey or toKey
cannot be compared to keys currently in the map.NullPointerException - if fromKey or toKey
is null and this map does not permit null keysIllegalArgumentException - if fromKey is greater than
toKey; or if this map itself has a restricted
range, and fromKey or toKey lies
outside the bounds of the rangedefault AtomicSortedMap<K,V> headMap(K toKey)
AtomicSortedMaptoKey. 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.
headMap in interface AtomicSortedMap<K extends Comparable<K>,V>toKey - high endpoint (exclusive) of the keys in the returned maptoKeyAtomicNavigableMap<K,V> headMap(K toKey, boolean inclusive)
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.
toKey - high endpoint of the keys in the returned mapinclusive - true if the high endpoint
is to be included in the returned viewinclusive is true) toKeyClassCastException - if toKey is not compatible
with this map's comparator (or, if the map has no comparator,
if toKey does not implement Comparable).
Implementations may, but are not required to, throw this
exception if toKey cannot be compared to keys
currently in the map.NullPointerException - if toKey is null
and this map does not permit null keysIllegalArgumentException - if this map itself has a
restricted range, and toKey lies outside the
bounds of the rangedefault AtomicSortedMap<K,V> tailMap(K fromKey)
AtomicSortedMapfromKey. 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.
tailMap in interface AtomicSortedMap<K extends Comparable<K>,V>fromKey - low endpoint (inclusive) of the keys in the returned mapfromKeyAtomicNavigableMap<K,V> tailMap(K fromKey, boolean inclusive)
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.
fromKey - low endpoint of the keys in the returned mapinclusive - true if the low endpoint
is to be included in the returned viewinclusive is true) fromKeyClassCastException - if fromKey is not compatible
with this map's comparator (or, if the map has no comparator,
if fromKey does not implement Comparable).
Implementations may, but are not required to, throw this
exception if fromKey cannot be compared to keys
currently in the map.NullPointerException - if fromKey is null
and this map does not permit null keysIllegalArgumentException - if this map itself has a
restricted range, and fromKey lies outside the
bounds of the rangeAsyncAtomicNavigableMap<K,V> async()
SyncPrimitiveasync in interface AtomicMap<K extends Comparable<K>,V>async in interface AtomicSortedMap<K extends Comparable<K>,V>async in interface SyncPrimitiveCopyright © 2013–2018. All rights reserved.