Package org.jboss.util.collection
Interface ConcurrentNavigableMap<K,V>
-
- Type Parameters:
K
- the type of keys maintained by this mapV
- the type of mapped values
- All Superinterfaces:
java.util.concurrent.ConcurrentMap<K,V>
,java.util.Map<K,V>
,NavigableMap<K,V>
,java.util.SortedMap<K,V>
- All Known Implementing Classes:
ConcurrentSkipListMap
,ConcurrentSkipListMap.ConcurrentSkipListSubMap
public interface ConcurrentNavigableMap<K,V> extends java.util.concurrent.ConcurrentMap<K,V>, NavigableMap<K,V>
AConcurrentMap
supportingNavigableMap
operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConcurrentNavigableMap<K,V>
headMap(K toKey)
Returns a view of the portion of this map whose keys are strictly less than toKey.ConcurrentNavigableMap<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.ConcurrentNavigableMap<K,V>
tailMap(K fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to fromKey.-
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size
-
Methods inherited from interface org.jboss.util.collection.NavigableMap
ceilingEntry, ceilingKey, descendingEntrySet, descendingKeySet, firstEntry, floorEntry, floorKey, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, pollFirstEntry, pollLastEntry
-
-
-
-
Method Detail
-
subMap
ConcurrentNavigableMap<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. (If fromKey and toKey are equal, the returned sorted map is empty.) The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa.- Specified by:
subMap
in interfaceNavigableMap<K,V>
- Specified by:
subMap
in interfacejava.util.SortedMap<K,V>
- Parameters:
fromKey
- low endpoint (inclusive) of the subMap.toKey
- high endpoint (exclusive) of the subMap.- Returns:
- a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
- Throws:
java.lang.ClassCastException
- 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).java.lang.IllegalArgumentException
- if fromKey is greater than toKey.java.lang.NullPointerException
- if fromKey or toKey is null and this map does not support null keys.
-
headMap
ConcurrentNavigableMap<K,V> headMap(K toKey)
Returns a view of the portion of this map whose keys are strictly less than toKey. The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa.- Specified by:
headMap
in interfaceNavigableMap<K,V>
- Specified by:
headMap
in interfacejava.util.SortedMap<K,V>
- Parameters:
toKey
- high endpoint (exclusive) of the headMap.- Returns:
- a view of the portion of this map whose keys are strictly less than toKey.
- Throws:
java.lang.ClassCastException
- if toKey is not compatible with this map's comparator (or, if the map has no comparator, if toKey does not implement Comparable).java.lang.NullPointerException
- if toKey is null and this map does not support null keys.
-
tailMap
ConcurrentNavigableMap<K,V> tailMap(K fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to fromKey. The returned sorted map is backed by this map, so changes in the returned sorted map are reflected in this map, and vice-versa.- Specified by:
tailMap
in interfaceNavigableMap<K,V>
- Specified by:
tailMap
in interfacejava.util.SortedMap<K,V>
- Parameters:
fromKey
- low endpoint (inclusive) of the tailMap.- Returns:
- a view of the portion of this map whose keys are greater than or equal to fromKey.
- Throws:
java.lang.ClassCastException
- if fromKey is not compatible with this map's comparator (or, if the map has no comparator, if fromKey does not implement Comparable).java.lang.NullPointerException
- if fromKey is null and this map does not support null keys.
-
-