10 |
|
/** |
11 |
|
* A {@link ConcurrentMap} supporting {@link NavigableMap} operations. |
12 |
|
* |
13 |
+ |
* <p>This interface is a member of the |
14 |
+ |
* <a href="{@docRoot}/../guide/collections/index.html"> |
15 |
+ |
* Java Collections Framework</a>. |
16 |
+ |
* |
17 |
|
* @author Doug Lea |
18 |
|
* @param <K> the type of keys maintained by this map |
19 |
< |
* @param <V> the type of mapped values |
19 |
> |
* @param <V> the type of mapped values |
20 |
> |
* @since 1.6 |
21 |
|
*/ |
22 |
< |
public interface ConcurrentNavigableMap<K,V> extends ConcurrentMap<K,V>, NavigableMap<K,V> { |
22 |
> |
public interface ConcurrentNavigableMap<K,V> |
23 |
> |
extends ConcurrentMap<K,V>, NavigableMap<K,V> |
24 |
> |
{ |
25 |
|
/** |
26 |
< |
* Returns a view of the portion of this map whose keys range from |
27 |
< |
* <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive. (If |
28 |
< |
* <tt>fromKey</tt> and <tt>toKey</tt> are equal, the returned sorted map |
22 |
< |
* is empty.) The returned sorted map is backed by this map, so changes |
23 |
< |
* in the returned sorted map are reflected in this map, and vice-versa. |
24 |
< |
|
25 |
< |
* @param fromKey low endpoint (inclusive) of the subMap. |
26 |
< |
* @param toKey high endpoint (exclusive) of the subMap. |
27 |
< |
* |
28 |
< |
* @return a view of the portion of this map whose keys range from |
29 |
< |
* <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive. |
30 |
< |
* |
31 |
< |
* @throws ClassCastException if <tt>fromKey</tt> and |
32 |
< |
* <tt>toKey</tt> cannot be compared to one another using this |
33 |
< |
* map's comparator (or, if the map has no comparator, using |
34 |
< |
* natural ordering). |
35 |
< |
* @throws IllegalArgumentException if <tt>fromKey</tt> is greater |
36 |
< |
* than <tt>toKey</tt>. |
37 |
< |
* @throws NullPointerException if <tt>fromKey</tt> or |
38 |
< |
* <tt>toKey</tt> is <tt>null</tt> and this map does not support |
39 |
< |
* <tt>null</tt> keys. |
26 |
> |
* @throws ClassCastException {@inheritDoc} |
27 |
> |
* @throws IllegalArgumentException {@inheritDoc} |
28 |
> |
* @throws NullPointerException {@inheritDoc} |
29 |
|
*/ |
30 |
< |
public ConcurrentNavigableMap<K,V> navigableSubMap(K fromKey, K toKey); |
30 |
> |
ConcurrentNavigableMap<K,V> navigableSubMap(K fromKey, K toKey); |
31 |
|
|
32 |
|
/** |
33 |
< |
* Returns a view of the portion of this map whose keys are strictly less |
34 |
< |
* than <tt>toKey</tt>. The returned sorted map is backed by this map, so |
35 |
< |
* changes in the returned sorted map are reflected in this map, and |
47 |
< |
* vice-versa. |
48 |
< |
* @param toKey high endpoint (exclusive) of the headMap. |
49 |
< |
* @return a view of the portion of this map whose keys are strictly |
50 |
< |
* less than <tt>toKey</tt>. |
51 |
< |
* |
52 |
< |
* @throws ClassCastException if <tt>toKey</tt> is not compatible |
53 |
< |
* with this map's comparator (or, if the map has no comparator, |
54 |
< |
* if <tt>toKey</tt> does not implement <tt>Comparable</tt>). |
55 |
< |
* @throws NullPointerException if <tt>toKey</tt> is <tt>null</tt> |
56 |
< |
* and this map does not support <tt>null</tt> keys. |
33 |
> |
* @throws ClassCastException {@inheritDoc} |
34 |
> |
* @throws IllegalArgumentException {@inheritDoc} |
35 |
> |
* @throws NullPointerException {@inheritDoc} |
36 |
|
*/ |
37 |
< |
public ConcurrentNavigableMap<K,V> navigableHeadMap(K toKey); |
37 |
> |
ConcurrentNavigableMap<K,V> navigableHeadMap(K toKey); |
38 |
|
|
39 |
|
/** |
40 |
< |
* Returns a view of the portion of this map whose keys are |
41 |
< |
* greater than or equal to <tt>fromKey</tt>. The returned sorted |
42 |
< |
* map is backed by this map, so changes in the returned sorted |
64 |
< |
* map are reflected in this map, and vice-versa. |
65 |
< |
* @param fromKey low endpoint (inclusive) of the tailMap. |
66 |
< |
* @return a view of the portion of this map whose keys are greater |
67 |
< |
* than or equal to <tt>fromKey</tt>. |
68 |
< |
* @throws ClassCastException if <tt>fromKey</tt> is not compatible |
69 |
< |
* with this map's comparator (or, if the map has no comparator, |
70 |
< |
* if <tt>fromKey</tt> does not implement <tt>Comparable</tt>). |
71 |
< |
* @throws NullPointerException if <tt>fromKey</tt> is <tt>null</tt> |
72 |
< |
* and this map does not support <tt>null</tt> keys. |
40 |
> |
* @throws ClassCastException {@inheritDoc} |
41 |
> |
* @throws IllegalArgumentException {@inheritDoc} |
42 |
> |
* @throws NullPointerException {@inheritDoc} |
43 |
|
*/ |
44 |
< |
public ConcurrentNavigableMap<K,V> navigableTailMap(K fromKey); |
44 |
> |
ConcurrentNavigableMap<K,V> navigableTailMap(K fromKey); |
45 |
|
} |