8 |
|
|
9 |
|
/** |
10 |
|
* A {@link SortedSet} extended with navigation methods reporting |
11 |
< |
* closest matches for given search targets. Methods {@code lower}, |
12 |
< |
* {@code floor}, {@code ceiling}, and {@code higher} return elements |
11 |
> |
* closest matches for given search targets. Methods {@link #lower}, |
12 |
> |
* {@link #floor}, {@link #ceiling}, and {@link #higher} return elements |
13 |
|
* respectively less than, less than or equal, greater than or equal, |
14 |
|
* and greater than a given element, returning {@code null} if there |
15 |
|
* is no such element. A {@code NavigableSet} may be accessed and |
18 |
|
* all relational and directional methods inverted. The performance of |
19 |
|
* ascending operations and views is likely to be faster than that of |
20 |
|
* descending ones. This interface additionally defines methods |
21 |
< |
* {@code pollFirst} and {@code pollLast} that return and remove the |
21 |
> |
* {@link #pollFirst} and {@link #pollLast} that return and remove the |
22 |
|
* lowest and highest element, if one exists, else returning {@code |
23 |
|
* null}. Methods {@code subSet}, {@code headSet}, |
24 |
|
* and {@code tailSet} differ from the like-named {@code |
143 |
|
* the iteration are undefined. |
144 |
|
* |
145 |
|
* <p>The returned set has an ordering equivalent to |
146 |
< |
* <tt>{@link Collections#reverseOrder(Comparator) Collections.reverseOrder}(comparator())</tt>. |
146 |
> |
* {@link Collections#reverseOrder(Comparator) Collections.reverseOrder}{@code (comparator())}. |
147 |
|
* The expression {@code s.descendingSet().descendingSet()} returns a |
148 |
|
* view of {@code s} essentially equivalent to {@code s}. |
149 |
|
* |
163 |
|
* Returns a view of the portion of this set whose elements range from |
164 |
|
* {@code fromElement} to {@code toElement}. If {@code fromElement} and |
165 |
|
* {@code toElement} are equal, the returned set is empty unless {@code |
166 |
< |
* fromExclusive} and {@code toExclusive} are both true. The returned set |
166 |
> |
* fromInclusive} and {@code toInclusive} are both true. The returned set |
167 |
|
* is backed by this set, so changes in the returned set are reflected in |
168 |
|
* this set, and vice-versa. The returned set supports all optional set |
169 |
|
* operations that this set supports. |
274 |
|
* @throws ClassCastException {@inheritDoc} |
275 |
|
* @throws NullPointerException {@inheritDoc} |
276 |
|
* @throws IllegalArgumentException {@inheritDoc} |
277 |
< |
na */ |
277 |
> |
*/ |
278 |
|
SortedSet<E> headSet(E toElement); |
279 |
|
|
280 |
|
/** |