- Type Parameters:
K
- the type of keys maintained by this mapV
- the type of mapped values
- All Superinterfaces:
ConcurrentMap<K,
,V> Map<K,
,V> NavigableMap<K,
,V> SortedMap<K,
V>
- All Known Implementing Classes:
ConcurrentSkipListMap
A
ConcurrentMap
supporting NavigableMap
operations,
and recursively so for its navigable sub-maps.
This interface is a member of the Java Collections Framework.
- Since:
- 1.6
- Author:
- Doug Lea
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a reverse orderNavigableSet
view of the keys contained in this map.Returns a reverse order view of the mappings contained in this map.keySet()
Returns aNavigableSet
view of the keys contained in this map.Returns aNavigableSet
view of the keys contained in this map.Methods declared in interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
Methods declared in interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size
Methods declared in interface java.util.NavigableMap
ceilingEntry, ceilingKey, firstEntry, floorEntry, floorKey, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, pollFirstEntry, pollLastEntry
-
Method Details
-
subMap
- Specified by:
subMap
in interfaceNavigableMap<K,
V> - Throws:
ClassCastException
NullPointerException
IllegalArgumentException
-
headMap
- Specified by:
headMap
in interfaceNavigableMap<K,
V> - Throws:
ClassCastException
NullPointerException
IllegalArgumentException
-
tailMap
- Specified by:
tailMap
in interfaceNavigableMap<K,
V> - Throws:
ClassCastException
NullPointerException
IllegalArgumentException
-
subMap
- Specified by:
subMap
in interfaceNavigableMap<K,
V> - Specified by:
subMap
in interfaceSortedMap<K,
V> - Throws:
ClassCastException
NullPointerException
IllegalArgumentException
-
headMap
- Specified by:
headMap
in interfaceNavigableMap<K,
V> - Specified by:
headMap
in interfaceSortedMap<K,
V> - Throws:
ClassCastException
NullPointerException
IllegalArgumentException
-
tailMap
- Specified by:
tailMap
in interfaceNavigableMap<K,
V> - Specified by:
tailMap
in interfaceSortedMap<K,
V> - Throws:
ClassCastException
NullPointerException
IllegalArgumentException
-
descendingMap
ConcurrentNavigableMap<K,V> descendingMap()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.The returned map has an ordering equivalent to
Collections.reverseOrder
(comparator())
. The expressionm.descendingMap().descendingMap()
returns a view ofm
essentially equivalent tom
.- Specified by:
descendingMap
in interfaceNavigableMap<K,
V> - Returns:
- a reverse order view of this map
-
keySet
NavigableSet<K> keySet()Returns aNavigableSet
view of the keys contained in this map. The set's iterator returns the keys in ascending order. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via theIterator.remove
,Set.remove
,removeAll
,retainAll
, andclear
operations. It does not support theadd
oraddAll
operations.The view's iterators and spliterators are weakly consistent.
This method is equivalent to method
navigableKeySet
. -
descendingKeySet
NavigableSet<K> descendingKeySet()Returns a reverse orderNavigableSet
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. The set supports element removal, which removes the corresponding mapping from the map, via theIterator.remove
,Set.remove
,removeAll
,retainAll
, andclear
operations. It does not support theadd
oraddAll
operations.The view's iterators and spliterators are weakly consistent.
- Specified by:
descendingKeySet
in interfaceNavigableMap<K,
V> - Returns:
- a reverse order navigable set view of the keys in this map
-