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:
- ConcurrentMap<K,V>, Map<K,V>, NavigableMap<K,V>, SortedMap<K,V>
- All Known Implementing Classes:
- ConcurrentSkipListMap
public interface ConcurrentNavigableMap<K,V>
- extends ConcurrentMap<K,V>, NavigableMap<K,V>
A ConcurrentMap
supporting NavigableMap
operations.
- Author:
- Doug Lea
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from interface org.jboss.util.collection.NavigableMap |
ceilingEntry, ceilingKey, descendingEntrySet, descendingKeySet, firstEntry, floorEntry, floorKey, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, pollFirstEntry, pollLastEntry |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
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 interface NavigableMap<K,V>
- Specified by:
subMap
in interface 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:
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).
IllegalArgumentException
- if fromKey is greater
than toKey.
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 interface NavigableMap<K,V>
- Specified by:
headMap
in interface 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:
ClassCastException
- if toKey is not compatible
with this map's comparator (or, if the map has no comparator,
if toKey does not implement Comparable).
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 interface NavigableMap<K,V>
- Specified by:
tailMap
in interface 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:
ClassCastException
- if fromKey is not compatible
with this map's comparator (or, if the map has no comparator,
if fromKey does not implement Comparable).
NullPointerException
- if fromKey is null
and this map does not support null keys.
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.