public interface AtomicSortedMap<K extends Comparable<K>,V> extends AtomicMap<K,V>
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
AsyncAtomicSortedMap<K,V> |
async()
Returns the underlying asynchronous primitive.
|
K |
firstKey()
Returns the lowest key in the map.
|
AtomicSortedMap<K,V> |
headMap(K toKey)
Returns a view of the portion of this map whose keys are strictly less than
toKey. |
K |
lastKey()
Returns the highest key in the map.
|
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. |
AtomicSortedMap<K,V> |
tailMap(K fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to
fromKey. |
addListener, 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, typeK firstKey()
K lastKey()
AtomicSortedMap<K,V> subMap(K fromKey, K toKey)
fromKey, 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.
fromKey - low endpoint (inclusive) of the keys in the returned maptoKey - high endpoint (exclusive) of the keys in the returned mapfromKey, inclusive, to toKey,
exclusiveClassCastException - 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 rangeAtomicSortedMap<K,V> headMap(K toKey)
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 (exclusive) of the keys in the returned maptoKeyClassCastException - 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 rangeAtomicSortedMap<K,V> tailMap(K fromKey)
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 (inclusive) of the keys in the returned mapfromKeyClassCastException - 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 rangeAsyncAtomicSortedMap<K,V> async()
SyncPrimitiveasync in interface AtomicMap<K extends Comparable<K>,V>async in interface SyncPrimitiveCopyright © 2013–2018. All rights reserved.