public interface java.util.concurrent
ConcurrentNavigableMap<K, V>


Show All Login
Java SE 6
  
Implements: ConcurrentMap, NavigableMap
Implemented by: ConcurrentSkipListMap
Details
A ConcurrentMap supporting NavigableMap operations, and recursively so for its navigable sub-maps.

This interface is a member of the Java Collections Framework.
Kthe type of keys maintained by this map
Vthe type of mapped values
since1.6


Methods
public NavigableSet descendingKeySet() Details
Returns a reverse order NavigableSet 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 the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
returna reverse order navigable set view of the keys in this map

public ConcurrentNavigableMap descendingMap() Details
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 expression m.descendingMap().descendingMap() returns a view of m essentially equivalent to m.
returna reverse order view of this map

public ConcurrentNavigableMap headMap(Object toKey, boolean inclusive) Details
ThrowsClassCastException: 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.
ThrowsNullPointerException: if toKey is null and this map does not permit null keys
ThrowsIllegalArgumentException: if this map itself has a restricted range, and toKey lies outside the bounds of the range
public ConcurrentNavigableMap headMap(Object toKey) Details
ThrowsClassCastException: 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.
ThrowsNullPointerException: if toKey is null and this map does not permit null keys
ThrowsIllegalArgumentException: if this map itself has a restricted range, and toKey lies outside the bounds of the range
public NavigableSet keySet() Details
Returns a NavigableSet 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 the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.

This method is equivalent to method navigableKeySet.
returna navigable set view of the keys in this map

public NavigableSet navigableKeySet() Details
Returns a NavigableSet 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 the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

The view's iterator is a "weakly consistent" iterator that will never throw ConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
returna navigable set view of the keys in this map

public ConcurrentNavigableMap subMap(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive) Details
ThrowsClassCastException: 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.
ThrowsNullPointerException: if fromKey or toKey is null and this map does not permit null keys
ThrowsIllegalArgumentException: 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 range
public ConcurrentNavigableMap subMap(Object fromKey, Object toKey) Details
ThrowsClassCastException: 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.
ThrowsNullPointerException: if fromKey or toKey is null and this map does not permit null keys
ThrowsIllegalArgumentException: 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 range
public ConcurrentNavigableMap tailMap(Object fromKey, boolean inclusive) Details
ThrowsClassCastException: 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.
ThrowsNullPointerException: if fromKey is null and this map does not permit null keys
ThrowsIllegalArgumentException: if this map itself has a restricted range, and fromKey lies outside the bounds of the range
public ConcurrentNavigableMap tailMap(Object fromKey) Details
ThrowsClassCastException: 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.
ThrowsNullPointerException: if fromKey is null and this map does not permit null keys
ThrowsIllegalArgumentException: if this map itself has a restricted range, and fromKey lies outside the bounds of the range