Package Summary  Overview Summary

class:ConcurrentNavigableMap [NONE]

Type Parameters:
K - the type of keys maintained by this map
V - 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, and recursively so for its navigable sub-maps.

This interface is a member of the Java Collections Framework .

Since:
1.6

method:descendingMap() [NONE]

  • 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 expression m.descendingMap().descendingMap() returns a view of m essentially equivalent to m.

    Specified by:
    descendingMap in interface NavigableMap<K,?V>
    Returns:
    a reverse order view of this map
  • method:navigableKeySet() [NONE]

    method:keySet() [NONE]

    keySet

    NavigableSet<K> keySet()
    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 iterators and spliterators are weakly consistent .

    This method is equivalent to method navigableKeySet.

    Specified by:
    keySet in interface Map<K,?V>
    Specified by:
    keySet in interface SortedMap<K,?V>
    Returns:
    a navigable set view of the keys in this map

    method:descendingKeySet() [NONE]

    descendingKeySet

    NavigableSet<K> descendingKeySet()
    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 iterators and spliterators are weakly consistent .

    Specified by:
    descendingKeySet in interface NavigableMap<K,?V>
    Returns:
    a reverse order navigable set view of the keys in this map

    © 2021 Oracle Corporation and/or its affiliates