ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentNavigableMap.java
Revision: 1.16
Committed: Thu Aug 8 20:12:10 2013 UTC (10 years, 9 months ago) by jsr166
Branch: MAIN
Changes since 1.15: +6 -15 lines
Log Message:
refactor definitions of "weakly consistent" into package-info.java

File Contents

# User Rev Content
1 dl 1.1 /*
2     * Written by Doug Lea with assistance from members of JCP JSR-166
3     * Expert Group and released to the public domain, as explained at
4 jsr166 1.12 * http://creativecommons.org/publicdomain/zero/1.0/
5 dl 1.1 */
6    
7     package java.util.concurrent;
8     import java.util.*;
9    
10     /**
11 dl 1.5 * A {@link ConcurrentMap} supporting {@link NavigableMap} operations,
12     * and recursively so for its navigable sub-maps.
13 dl 1.1 *
14 jsr166 1.3 * <p>This interface is a member of the
15 jsr166 1.11 * <a href="{@docRoot}/../technotes/guides/collections/index.html">
16 jsr166 1.3 * Java Collections Framework</a>.
17     *
18 dl 1.1 * @author Doug Lea
19     * @param <K> the type of keys maintained by this map
20 jsr166 1.3 * @param <V> the type of mapped values
21     * @since 1.6
22 dl 1.1 */
23 jsr166 1.3 public interface ConcurrentNavigableMap<K,V>
24     extends ConcurrentMap<K,V>, NavigableMap<K,V>
25     {
26 dl 1.1 /**
27 jsr166 1.3 * @throws ClassCastException {@inheritDoc}
28 jsr166 1.4 * @throws NullPointerException {@inheritDoc}
29 jsr166 1.3 * @throws IllegalArgumentException {@inheritDoc}
30 dl 1.1 */
31 dl 1.9 ConcurrentNavigableMap<K,V> subMap(K fromKey, boolean fromInclusive,
32     K toKey, boolean toInclusive);
33 dl 1.1
34     /**
35 jsr166 1.3 * @throws ClassCastException {@inheritDoc}
36 jsr166 1.4 * @throws NullPointerException {@inheritDoc}
37 jsr166 1.3 * @throws IllegalArgumentException {@inheritDoc}
38 dl 1.1 */
39 dl 1.9 ConcurrentNavigableMap<K,V> headMap(K toKey, boolean inclusive);
40 dl 1.8
41 dl 1.1 /**
42 jsr166 1.3 * @throws ClassCastException {@inheritDoc}
43 jsr166 1.4 * @throws NullPointerException {@inheritDoc}
44 jsr166 1.3 * @throws IllegalArgumentException {@inheritDoc}
45 dl 1.1 */
46 dl 1.9 ConcurrentNavigableMap<K,V> tailMap(K fromKey, boolean inclusive);
47 dl 1.5
48     /**
49     * @throws ClassCastException {@inheritDoc}
50     * @throws NullPointerException {@inheritDoc}
51     * @throws IllegalArgumentException {@inheritDoc}
52     */
53     ConcurrentNavigableMap<K,V> subMap(K fromKey, K toKey);
54    
55     /**
56     * @throws ClassCastException {@inheritDoc}
57     * @throws NullPointerException {@inheritDoc}
58     * @throws IllegalArgumentException {@inheritDoc}
59     */
60     ConcurrentNavigableMap<K,V> headMap(K toKey);
61    
62     /**
63     * @throws ClassCastException {@inheritDoc}
64     * @throws NullPointerException {@inheritDoc}
65     * @throws IllegalArgumentException {@inheritDoc}
66     */
67     ConcurrentNavigableMap<K,V> tailMap(K fromKey);
68    
69 jsr166 1.11 /**
70     * Returns a reverse order view of the mappings contained in this map.
71     * The descending map is backed by this map, so changes to the map are
72     * reflected in the descending map, and vice-versa.
73     *
74     * <p>The returned map has an ordering equivalent to
75 jsr166 1.14 * {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}.
76 jsr166 1.11 * The expression {@code m.descendingMap().descendingMap()} returns a
77     * view of {@code m} essentially equivalent to {@code m}.
78     *
79     * @return a reverse order view of this map
80     */
81 dl 1.8 ConcurrentNavigableMap<K,V> descendingMap();
82 jsr166 1.11
83     /**
84     * Returns a {@link NavigableSet} view of the keys contained in this map.
85     * The set's iterator returns the keys in ascending order.
86     * The set is backed by the map, so changes to the map are
87     * reflected in the set, and vice-versa. The set supports element
88     * removal, which removes the corresponding mapping from the map,
89     * via the {@code Iterator.remove}, {@code Set.remove},
90     * {@code removeAll}, {@code retainAll}, and {@code clear}
91     * operations. It does not support the {@code add} or {@code addAll}
92     * operations.
93     *
94 jsr166 1.16 * <p>The view's iterators and spliterators are
95     * <a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.
96 jsr166 1.11 *
97     * @return a navigable set view of the keys in this map
98     */
99     public NavigableSet<K> navigableKeySet();
100    
101     /**
102     * Returns a {@link NavigableSet} view of the keys contained in this map.
103     * The set's iterator returns the keys in ascending order.
104     * The set is backed by the map, so changes to the map are
105     * reflected in the set, and vice-versa. The set supports element
106     * removal, which removes the corresponding mapping from the map,
107     * via the {@code Iterator.remove}, {@code Set.remove},
108     * {@code removeAll}, {@code retainAll}, and {@code clear}
109     * operations. It does not support the {@code add} or {@code addAll}
110     * operations.
111     *
112 jsr166 1.16 * <p>The view's iterators and spliterators are
113     * <a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.
114 jsr166 1.11 *
115     * <p>This method is equivalent to method {@code navigableKeySet}.
116     *
117     * @return a navigable set view of the keys in this map
118     */
119     NavigableSet<K> keySet();
120    
121     /**
122     * Returns a reverse order {@link NavigableSet} view of the keys contained in this map.
123     * The set's iterator returns the keys in descending order.
124     * The set is backed by the map, so changes to the map are
125     * reflected in the set, and vice-versa. The set supports element
126     * removal, which removes the corresponding mapping from the map,
127     * via the {@code Iterator.remove}, {@code Set.remove},
128     * {@code removeAll}, {@code retainAll}, and {@code clear}
129     * operations. It does not support the {@code add} or {@code addAll}
130     * operations.
131     *
132 jsr166 1.16 * <p>The view's iterators and spliterators are
133     * <a href="package-summary.html#Weakly"><i>weakly consistent</i></a>.
134 jsr166 1.11 *
135     * @return a reverse order navigable set view of the keys in this map
136     */
137     public NavigableSet<K> descendingKeySet();
138 dl 1.1 }