9 |
|
/** |
10 |
|
* A {@link SortedMap} extended with navigation methods returning the |
11 |
|
* closest matches for given search targets. Methods |
12 |
< |
* {@code lowerEntry}, {@code floorEntry}, {@code ceilingEntry}, |
13 |
< |
* and {@code higherEntry} return {@code Map.Entry} objects |
12 |
> |
* {@link #lowerEntry}, {@link #floorEntry}, {@link #ceilingEntry}, |
13 |
> |
* and {@link #higherEntry} return {@code Map.Entry} objects |
14 |
|
* associated with keys respectively less than, less than or equal, |
15 |
|
* greater than or equal, and greater than a given key, returning |
16 |
|
* {@code null} if there is no such key. Similarly, methods |
17 |
< |
* {@code lowerKey}, {@code floorKey}, {@code ceilingKey}, and |
18 |
< |
* {@code higherKey} return only the associated keys. All of these |
17 |
> |
* {@link #lowerKey}, {@link #floorKey}, {@link #ceilingKey}, and |
18 |
> |
* {@link #higherKey} return only the associated keys. All of these |
19 |
|
* methods are designed for locating, not traversing entries. |
20 |
|
* |
21 |
|
* <p>A {@code NavigableMap} may be accessed and traversed in either |
22 |
< |
* ascending or descending key order. The {@code descendingMap} |
22 |
> |
* ascending or descending key order. The {@link #descendingMap} |
23 |
|
* method returns a view of the map with the senses of all relational |
24 |
|
* and directional methods inverted. The performance of ascending |
25 |
|
* operations and views is likely to be faster than that of descending |
26 |
< |
* ones. Methods {@code subMap}, {@code headMap}, |
27 |
< |
* and {@code tailMap} differ from the like-named {@code |
28 |
< |
* SortedMap} methods in accepting additional arguments describing |
29 |
< |
* whether lower and upper bounds are inclusive versus exclusive. |
30 |
< |
* Submaps of any {@code NavigableMap} must implement the {@code |
31 |
< |
* NavigableMap} interface. |
26 |
> |
* ones. Methods |
27 |
> |
* {@link #subMap(Object, boolean, Object, boolean) subMap(K, boolean, K, boolean)}, |
28 |
> |
* {@link #headMap(Object, boolean) headMap(K, boolean)}, and |
29 |
> |
* {@link #tailMap(Object, boolean) tailMap(K, boolean)} |
30 |
> |
* differ from the like-named {@code SortedMap} methods in accepting |
31 |
> |
* additional arguments describing whether lower and upper bounds are |
32 |
> |
* inclusive versus exclusive. Submaps of any {@code NavigableMap} |
33 |
> |
* must implement the {@code NavigableMap} interface. |
34 |
|
* |
35 |
< |
* <p>This interface additionally defines methods {@code firstEntry}, |
36 |
< |
* {@code pollFirstEntry}, {@code lastEntry}, and |
37 |
< |
* {@code pollLastEntry} that return and/or remove the least and |
35 |
> |
* <p>This interface additionally defines methods {@link #firstEntry}, |
36 |
> |
* {@link #pollFirstEntry}, {@link #lastEntry}, and |
37 |
> |
* {@link #pollLastEntry} that return and/or remove the least and |
38 |
|
* greatest mappings, if any exist, else returning {@code null}. |
39 |
|
* |
40 |
|
* <p>Implementations of entry-returning methods are expected to |
53 |
|
* implement {@code NavigableMap}, but extensions and implementations |
54 |
|
* of this interface are encouraged to override these methods to return |
55 |
|
* {@code NavigableMap}. Similarly, |
56 |
< |
* {@link #keySet()} can be overridden to return {@code NavigableSet}. |
56 |
> |
* {@link #keySet()} can be overridden to return {@link NavigableSet}. |
57 |
|
* |
58 |
|
* <p>This interface is a member of the |
59 |
< |
* <a href="{@docRoot}/../technotes/guides/collections/index.html"> |
59 |
> |
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework"> |
60 |
|
* Java Collections Framework</a>. |
61 |
|
* |
62 |
|
* @author Doug Lea |
227 |
|
* operation), the results of the iteration are undefined. |
228 |
|
* |
229 |
|
* <p>The returned map has an ordering equivalent to |
230 |
< |
* <tt>{@link Collections#reverseOrder(Comparator) Collections.reverseOrder}(comparator())</tt>. |
230 |
> |
* {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}. |
231 |
|
* The expression {@code m.descendingMap().descendingMap()} returns a |
232 |
|
* view of {@code m} essentially equivalent to {@code m}. |
233 |
|
* |
271 |
|
* Returns a view of the portion of this map whose keys range from |
272 |
|
* {@code fromKey} to {@code toKey}. If {@code fromKey} and |
273 |
|
* {@code toKey} are equal, the returned map is empty unless |
274 |
< |
* {@code fromExclusive} and {@code toExclusive} are both true. The |
274 |
> |
* {@code fromInclusive} and {@code toInclusive} are both true. The |
275 |
|
* returned map is backed by this map, so changes in the returned map are |
276 |
|
* reflected in this map, and vice-versa. The returned map supports all |
277 |
|
* optional map operations that this map supports. |