Interface ConcurrentNavigableMap<K,​V>

    • 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 interface NavigableMap<K,​V>
        Specified by:
        subMap in interface java.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 interface NavigableMap<K,​V>
        Specified by:
        headMap in interface java.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 interface NavigableMap<K,​V>
        Specified by:
        tailMap in interface java.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.