51 |
|
* greater than or equal to the given key, or <tt>null</tt> if there is |
52 |
|
* no such entry. |
53 |
|
* |
54 |
< |
* @param key the key. |
54 |
> |
* @param key the key |
55 |
|
* @return an Entry associated with ceiling of given key, or <tt>null</tt> |
56 |
< |
* if there is no such Entry. |
56 |
> |
* if there is no such Entry |
57 |
|
* @throws ClassCastException if key cannot be compared with the keys |
58 |
< |
* currently in the map. |
58 |
> |
* currently in the map |
59 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
60 |
< |
* does not support <tt>null</tt> keys. |
60 |
> |
* does not support <tt>null</tt> keys |
61 |
|
*/ |
62 |
|
public Map.Entry<K,V> ceilingEntry(K key); |
63 |
|
|
65 |
|
* Returns least key greater than or equal to the given key, or |
66 |
|
* <tt>null</tt> if there is no such key. |
67 |
|
* |
68 |
< |
* @param key the key. |
68 |
> |
* @param key the key |
69 |
|
* @return the ceiling key, or <tt>null</tt> |
70 |
< |
* if there is no such key. |
70 |
> |
* if there is no such key |
71 |
|
* @throws ClassCastException if key cannot be compared with the keys |
72 |
< |
* currently in the map. |
72 |
> |
* currently in the map |
73 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
74 |
< |
* does not support <tt>null</tt> keys. |
74 |
> |
* does not support <tt>null</tt> keys |
75 |
|
*/ |
76 |
|
public K ceilingKey(K key); |
77 |
|
|
80 |
|
* key strictly less than the given key, or <tt>null</tt> if there is no |
81 |
|
* such entry. |
82 |
|
* |
83 |
< |
* @param key the key. |
83 |
> |
* @param key the key |
84 |
|
* @return an Entry with greatest key less than the given |
85 |
< |
* key, or <tt>null</tt> if there is no such Entry. |
85 |
> |
* key, or <tt>null</tt> if there is no such Entry |
86 |
|
* @throws ClassCastException if key cannot be compared with the keys |
87 |
< |
* currently in the map. |
87 |
> |
* currently in the map |
88 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
89 |
< |
* does not support <tt>null</tt> keys. |
89 |
> |
* does not support <tt>null</tt> keys |
90 |
|
*/ |
91 |
|
public Map.Entry<K,V> lowerEntry(K key); |
92 |
|
|
94 |
|
* Returns the greatest key strictly less than the given key, or |
95 |
|
* <tt>null</tt> if there is no such key. |
96 |
|
* |
97 |
< |
* @param key the key. |
97 |
> |
* @param key the key |
98 |
|
* @return the greatest key less than the given |
99 |
< |
* key, or <tt>null</tt> if there is no such key. |
99 |
> |
* key, or <tt>null</tt> if there is no such key |
100 |
|
* @throws ClassCastException if key cannot be compared with the keys |
101 |
< |
* currently in the map. |
101 |
> |
* currently in the map |
102 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
103 |
< |
* does not support <tt>null</tt> keys. |
103 |
> |
* does not support <tt>null</tt> keys |
104 |
|
*/ |
105 |
|
public K lowerKey(K key); |
106 |
|
|
109 |
|
* less than or equal to the given key, or <tt>null</tt> if there |
110 |
|
* is no such entry. |
111 |
|
* |
112 |
< |
* @param key the key. |
112 |
> |
* @param key the key |
113 |
|
* @return an Entry associated with floor of given key, or <tt>null</tt> |
114 |
< |
* if there is no such Entry. |
114 |
> |
* if there is no such Entry |
115 |
|
* @throws ClassCastException if key cannot be compared with the keys |
116 |
< |
* currently in the map. |
116 |
> |
* currently in the map |
117 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
118 |
< |
* does not support <tt>null</tt> keys. |
118 |
> |
* does not support <tt>null</tt> keys |
119 |
|
*/ |
120 |
|
public Map.Entry<K,V> floorEntry(K key); |
121 |
|
|
124 |
|
* less than or equal to the given key, or <tt>null</tt> if there |
125 |
|
* is no such key. |
126 |
|
* |
127 |
< |
* @param key the key. |
127 |
> |
* @param key the key |
128 |
|
* @return the floor of given key, or <tt>null</tt> if there is no |
129 |
< |
* such key. |
129 |
> |
* such key |
130 |
|
* @throws ClassCastException if key cannot be compared with the keys |
131 |
< |
* currently in the map. |
131 |
> |
* currently in the map |
132 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
133 |
< |
* does not support <tt>null</tt> keys. |
133 |
> |
* does not support <tt>null</tt> keys |
134 |
|
*/ |
135 |
|
public K floorKey(K key); |
136 |
|
|
139 |
|
* strictly greater than the given key, or <tt>null</tt> if there |
140 |
|
* is no such entry. |
141 |
|
* |
142 |
< |
* @param key the key. |
142 |
> |
* @param key the key |
143 |
|
* @return an Entry with least key greater than the given key, or |
144 |
< |
* <tt>null</tt> if there is no such Entry. |
144 |
> |
* <tt>null</tt> if there is no such Entry |
145 |
|
* @throws ClassCastException if key cannot be compared with the keys |
146 |
< |
* currently in the map. |
146 |
> |
* currently in the map |
147 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
148 |
< |
* does not support <tt>null</tt> keys. |
148 |
> |
* does not support <tt>null</tt> keys |
149 |
|
*/ |
150 |
|
public Map.Entry<K,V> higherEntry(K key); |
151 |
|
|
153 |
|
* Returns the least key strictly greater than the given key, or |
154 |
|
* <tt>null</tt> if there is no such key. |
155 |
|
* |
156 |
< |
* @param key the key. |
156 |
> |
* @param key the key |
157 |
|
* @return the least key greater than the given key, or |
158 |
< |
* <tt>null</tt> if there is no such key. |
158 |
> |
* <tt>null</tt> if there is no such key |
159 |
|
* @throws ClassCastException if key cannot be compared with the keys |
160 |
< |
* currently in the map. |
160 |
> |
* currently in the map |
161 |
|
* @throws NullPointerException if key is <tt>null</tt> and this map |
162 |
< |
* does not support <tt>null</tt> keys. |
162 |
> |
* does not support <tt>null</tt> keys |
163 |
|
*/ |
164 |
|
public K higherKey(K key); |
165 |
|
|
168 |
|
* key in this map, or <tt>null</tt> if the map is empty. |
169 |
|
* |
170 |
|
* @return an Entry with least key, or <tt>null</tt> |
171 |
< |
* if the map is empty. |
171 |
> |
* if the map is empty |
172 |
|
*/ |
173 |
|
public Map.Entry<K,V> firstEntry(); |
174 |
|
|
177 |
|
* key in this map, or <tt>null</tt> if the map is empty. |
178 |
|
* |
179 |
|
* @return an Entry with greatest key, or <tt>null</tt> |
180 |
< |
* if the map is empty. |
180 |
> |
* if the map is empty |
181 |
|
*/ |
182 |
|
public Map.Entry<K,V> lastEntry(); |
183 |
|
|
186 |
|
* the least key in this map, or <tt>null</tt> if the map is empty. |
187 |
|
* |
188 |
|
* @return the removed first entry of this map, or <tt>null</tt> |
189 |
< |
* if the map is empty. |
189 |
> |
* if the map is empty |
190 |
|
*/ |
191 |
|
public Map.Entry<K,V> pollFirstEntry(); |
192 |
|
|
195 |
|
* the greatest key in this map, or <tt>null</tt> if the map is empty. |
196 |
|
* |
197 |
|
* @return the removed last entry of this map, or <tt>null</tt> |
198 |
< |
* if the map is empty. |
198 |
> |
* if the map is empty |
199 |
|
*/ |
200 |
|
public Map.Entry<K,V> pollLastEntry(); |
201 |
|
|
212 |
|
* operations. It does not support the add or <tt>addAll</tt> |
213 |
|
* operations. |
214 |
|
* |
215 |
< |
* @return a set view of the keys contained in this map. |
215 |
> |
* @return a set view of the keys contained in this map |
216 |
|
*/ |
217 |
|
Set<K> descendingKeySet(); |
218 |
|
|
232 |
|
* operations. It does not support the <tt>add</tt> or |
233 |
|
* <tt>addAll</tt> operations. |
234 |
|
* |
235 |
< |
* @return a set view of the mappings contained in this map. |
235 |
> |
* @return a set view of the mappings contained in this map |
236 |
|
*/ |
237 |
|
Set<Map.Entry<K, V>> descendingEntrySet(); |
238 |
|
|
243 |
|
* is empty.) The returned sorted map is backed by this map, so changes |
244 |
|
* in the returned sorted map are reflected in this map, and vice-versa. |
245 |
|
* |
246 |
< |
* @param fromKey low endpoint (inclusive) of the subMap. |
247 |
< |
* @param toKey high endpoint (exclusive) of the subMap. |
246 |
> |
* @param fromKey low endpoint (inclusive) of the subMap |
247 |
> |
* @param toKey high endpoint (exclusive) of the subMap |
248 |
|
* |
249 |
|
* @return a view of the portion of this map whose keys range from |
250 |
< |
* <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive. |
250 |
> |
* <tt>fromKey</tt>, inclusive, to <tt>toKey</tt>, exclusive |
251 |
|
* |
252 |
|
* @throws ClassCastException if <tt>fromKey</tt> and |
253 |
|
* <tt>toKey</tt> cannot be compared to one another using this |
254 |
|
* map's comparator (or, if the map has no comparator, using |
255 |
< |
* natural ordering). |
255 |
> |
* natural ordering) |
256 |
|
* @throws IllegalArgumentException if <tt>fromKey</tt> is greater |
257 |
< |
* than <tt>toKey</tt>. |
257 |
> |
* than <tt>toKey</tt> |
258 |
|
* @throws NullPointerException if <tt>fromKey</tt> or |
259 |
|
* <tt>toKey</tt> is <tt>null</tt> and this map does not support |
260 |
< |
* <tt>null</tt> keys. |
260 |
> |
* <tt>null</tt> keys |
261 |
|
*/ |
262 |
|
public NavigableMap<K,V> subMap(K fromKey, K toKey); |
263 |
|
|
266 |
|
* than <tt>toKey</tt>. The returned sorted map is backed by this map, so |
267 |
|
* changes in the returned sorted map are reflected in this map, and |
268 |
|
* vice-versa. |
269 |
< |
* @param toKey high endpoint (exclusive) of the headMap. |
269 |
> |
* @param toKey high endpoint (exclusive) of the headMap |
270 |
|
* @return a view of the portion of this map whose keys are strictly |
271 |
< |
* less than <tt>toKey</tt>. |
271 |
> |
* less than <tt>toKey</tt> |
272 |
|
* |
273 |
|
* @throws ClassCastException if <tt>toKey</tt> is not compatible |
274 |
|
* with this map's comparator (or, if the map has no comparator, |
275 |
< |
* if <tt>toKey</tt> does not implement <tt>Comparable</tt>). |
275 |
> |
* if <tt>toKey</tt> does not implement <tt>Comparable</tt>) |
276 |
|
* @throws NullPointerException if <tt>toKey</tt> is <tt>null</tt> |
277 |
< |
* and this map does not support <tt>null</tt> keys. |
277 |
> |
* and this map does not support <tt>null</tt> keys |
278 |
|
*/ |
279 |
|
public NavigableMap<K,V> headMap(K toKey); |
280 |
|
|
283 |
|
* greater than or equal to <tt>fromKey</tt>. The returned sorted |
284 |
|
* map is backed by this map, so changes in the returned sorted |
285 |
|
* map are reflected in this map, and vice-versa. |
286 |
< |
* @param fromKey low endpoint (inclusive) of the tailMap. |
286 |
> |
* @param fromKey low endpoint (inclusive) of the tailMap |
287 |
|
* @return a view of the portion of this map whose keys are greater |
288 |
< |
* than or equal to <tt>fromKey</tt>. |
288 |
> |
* than or equal to <tt>fromKey</tt> |
289 |
|
* @throws ClassCastException if <tt>fromKey</tt> is not compatible |
290 |
|
* with this map's comparator (or, if the map has no comparator, |
291 |
< |
* if <tt>fromKey</tt> does not implement <tt>Comparable</tt>). |
291 |
> |
* if <tt>fromKey</tt> does not implement <tt>Comparable</tt>) |
292 |
|
* @throws NullPointerException if <tt>fromKey</tt> is <tt>null</tt> |
293 |
< |
* and this map does not support <tt>null</tt> keys. |
293 |
> |
* and this map does not support <tt>null</tt> keys |
294 |
|
*/ |
295 |
|
public NavigableMap<K,V> tailMap(K fromKey); |
296 |
|
} |