edu.emory.mathcs.backport.java.util.concurrent
Interface ConcurrentNavigableMap

All Superinterfaces:
ConcurrentMap, java.util.Map, NavigableMap, java.util.SortedMap
All Known Implementing Classes:
ConcurrentSkipListMap

public interface ConcurrentNavigableMap
extends ConcurrentMap, NavigableMap

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
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Method Summary
 java.util.SortedMap headMap(java.lang.Object toKey)
          Equivalent to navigableHeadMap(java.lang.Object).
 NavigableMap navigableHeadMap(java.lang.Object toKey)
          Returns a view of the portion of this map whose keys are strictly less than toKey.
 NavigableMap navigableSubMap(java.lang.Object fromKey, java.lang.Object toKey)
          Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
 NavigableMap navigableTailMap(java.lang.Object fromKey)
          Returns a view of the portion of this map whose keys are greater than or equal to fromKey.
 java.util.SortedMap subMap(java.lang.Object fromKey, java.lang.Object toKey)
          Equivalent to navigableSubMap(java.lang.Object, java.lang.Object).
 java.util.SortedMap tailMap(java.lang.Object fromKey)
          Equivalent to navigableTailMap(java.lang.Object).
 
Methods inherited from interface edu.emory.mathcs.backport.java.util.concurrent.ConcurrentMap
putIfAbsent, remove, replace, replace
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from interface edu.emory.mathcs.backport.java.util.NavigableMap
ceilingEntry, ceilingKey, descendingEntrySet, descendingKeySet, firstEntry, floorEntry, floorKey, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, pollFirstEntry, pollLastEntry
 
Methods inherited from interface java.util.SortedMap
comparator, firstKey, lastKey
 

Method Detail

navigableSubMap

public NavigableMap navigableSubMap(java.lang.Object fromKey,
                                    java.lang.Object toKey)
Description copied from interface: NavigableMap
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 map is empty.) The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Specified by:
navigableSubMap in interface NavigableMap
Parameters:
fromKey - low endpoint (inclusive) of the keys in the returned map
toKey - high endpoint (exclusive) of the keys in the returned map
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). Implementations may, but are not required to, throw this exception if fromKey or toKey cannot be compared to keys currently in the map.
java.lang.NullPointerException - if fromKey or toKey is null and this map does not permit null keys
java.lang.IllegalArgumentException - 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

navigableHeadMap

public NavigableMap navigableHeadMap(java.lang.Object toKey)
Description copied from interface: NavigableMap
Returns a view of the portion of this map whose keys are strictly less than toKey. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Specified by:
navigableHeadMap in interface NavigableMap
Parameters:
toKey - high endpoint (exclusive) of the keys in the returned map
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). Implementations may, but are not required to, throw this exception if toKey cannot be compared to keys currently in the map.
java.lang.NullPointerException - if toKey is null and this map does not permit null keys
java.lang.IllegalArgumentException - if this map itself has a restricted range, and toKey lies outside the bounds of the range

navigableTailMap

public NavigableMap navigableTailMap(java.lang.Object fromKey)
Description copied from interface: NavigableMap
Returns a view of the portion of this map whose keys are greater than or equal to fromKey. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Specified by:
navigableTailMap in interface NavigableMap
Parameters:
fromKey - low endpoint (inclusive) of the keys in the returned map
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). Implementations may, but are not required to, throw this exception if fromKey cannot be compared to keys currently in the map.
java.lang.NullPointerException - if fromKey is null and this map does not permit null keys
java.lang.IllegalArgumentException - if this map itself has a restricted range, and fromKey lies outside the bounds of the range

subMap

public java.util.SortedMap subMap(java.lang.Object fromKey,
                                  java.lang.Object toKey)
Equivalent to navigableSubMap(java.lang.Object, java.lang.Object).

Specified by:
subMap in interface java.util.SortedMap
Throws:
java.lang.ClassCastException
java.lang.NullPointerException
java.lang.IllegalArgumentException

headMap

public java.util.SortedMap headMap(java.lang.Object toKey)
Equivalent to navigableHeadMap(java.lang.Object).

Specified by:
headMap in interface java.util.SortedMap
Throws:
java.lang.ClassCastException
java.lang.NullPointerException
java.lang.IllegalArgumentException

tailMap

public java.util.SortedMap tailMap(java.lang.Object fromKey)
Equivalent to navigableTailMap(java.lang.Object).

Specified by:
tailMap in interface java.util.SortedMap
Throws:
java.lang.ClassCastException
java.lang.NullPointerException
java.lang.IllegalArgumentException