9 |
|
import java.util.*; |
10 |
|
|
11 |
|
/** |
12 |
< |
* A {@link SortedMap} extended with navigation methods returning |
13 |
< |
* key-value pairs holding the closest matches for given search |
14 |
< |
* targets. Methods <tt>lowerEntry</tt>, <tt>floorEntry</tt>, |
15 |
< |
* <tt>ceilingEntry</tt>, and <tt>higherEntry</tt> return |
16 |
< |
* <tt>Map.Entry</tt> objects associated with keys respectively less |
17 |
< |
* than, less than or equal, greater than or equal, and greater than a |
18 |
< |
* given key, returning <tt>null</tt> if there is no such key. |
19 |
< |
* Similarly, methods <tt>lowerKey</tt>, <tt>floorKey</tt>, |
20 |
< |
* <tt>ceilingKey</tt>, and <tt>higherKey</tt> return only the |
21 |
< |
* associated keys. All of these methods are designed for locating, |
22 |
< |
* not traversing entries. |
12 |
> |
* A {@link SortedMap} extended with navigation methods returning the |
13 |
> |
* closest matches for given search targets. Methods |
14 |
> |
* <tt>lowerEntry</tt>, <tt>floorEntry</tt>, <tt>ceilingEntry</tt>, |
15 |
> |
* and <tt>higherEntry</tt> return <tt>Map.Entry</tt> objects |
16 |
> |
* associated with keys respectively less than, less than or equal, |
17 |
> |
* greater than or equal, and greater than a given key, returning |
18 |
> |
* <tt>null</tt> if there is no such key. Similarly, methods |
19 |
> |
* <tt>lowerKey</tt>, <tt>floorKey</tt>, <tt>ceilingKey</tt>, and |
20 |
> |
* <tt>higherKey</tt> return only the associated keys. All of these |
21 |
> |
* methods are designed for locating, not traversing entries. |
22 |
|
* |
23 |
|
* <p>A <tt>NavigableMap</tt> may be viewed and traversed in either |
24 |
|
* ascending or descending key order. The <tt>Map</tt> methods |
25 |
< |
* <tt>keySet</tt> and <tt>entrySet</tt>) return ascending views, and |
25 |
> |
* <tt>keySet</tt> and <tt>entrySet</tt> return ascending views, and |
26 |
|
* the additional methods <tt>descendingKeySet</tt> and |
27 |
< |
* <tt>descendingEntrySet</tt>) return descending views. The |
27 |
> |
* <tt>descendingEntrySet</tt> return descending views. The |
28 |
|
* performance of ascending traversals is likely to be faster than |
29 |
|
* descending traversals. Notice that it is possible to perform |
30 |
|
* subrannge traversals in either direction using <tt>SubMap</tt>. |
219 |
|
/** |
220 |
|
* Returns a set view of the mappings contained in this map, in |
221 |
|
* descending key order. Each element in the returned set is a |
222 |
< |
* {@link Map.Entry}. The set is backed by the map, so changes to |
222 |
> |
* <tt>Map.Entry</tt>. The set is backed by the map, so changes to |
223 |
|
* the map are reflected in the set, and vice-versa. If the map |
224 |
|
* is modified while an iteration over the set is in progress |
225 |
|
* (except through the iterator's own <tt>remove</tt> operation, |