5 |
|
*/ |
6 |
|
|
7 |
|
package java.util; |
8 |
+ |
import java.util.*; // for javadoc (till 6280605 is fixed) |
9 |
|
|
10 |
|
/** |
11 |
|
* A {@link SortedSet} extended with navigation methods reporting |
24 |
|
* element, if one exists, else returning <tt>null</tt>. |
25 |
|
* Methods <tt>navigableSubSet</tt>, <tt>navigableHeadSet</tt>, and |
26 |
|
* <tt>navigableTailSet</tt> differ from the similarly named |
27 |
< |
* <tt>SortedSet</tt> methods only in that the returned sets |
28 |
< |
* are guaranteed to obey the <tt>NavigableSet</tt> interface. |
27 |
> |
* <tt>SortedSet</tt> methods only in their declared return types. |
28 |
> |
* Subsets of any <tt>NavigableSet</tt> must implement the |
29 |
> |
* <tt>NavigableSet</tt> interface. |
30 |
|
* |
31 |
|
* <p> The return values of navigation methods may be ambiguous in |
32 |
|
* implementations that permit <tt>null</tt> elements. However, even |
102 |
|
E higher(E e); |
103 |
|
|
104 |
|
/** |
105 |
< |
* Retrieves and removes the first (lowest) element. |
105 |
> |
* Retrieves and removes the first (lowest) element, |
106 |
> |
* or returns <tt>null</tt> if this set is empty. |
107 |
|
* |
108 |
|
* @return the first element, or <tt>null</tt> if this set is empty |
109 |
|
*/ |
110 |
|
E pollFirst(); |
111 |
|
|
112 |
|
/** |
113 |
< |
* Retrieves and removes the last (highest) element. |
113 |
> |
* Retrieves and removes the last (highest) element, |
114 |
> |
* or returns <tt>null</tt> if this set is empty. |
115 |
|
* |
116 |
|
* @return the last element, or <tt>null</tt> if this set is empty |
117 |
|
*/ |
118 |
|
E pollLast(); |
119 |
|
|
120 |
|
/** |
121 |
< |
* Returns an iterator over the elements in this set, in |
118 |
< |
* descending order. |
121 |
> |
* Returns an iterator over the elements in this set, in ascending order. |
122 |
|
* |
123 |
< |
* @return an <tt>Iterator</tt> over the elements in this set |
123 |
> |
* @return an iterator over the elements in this set, in ascending order |
124 |
> |
*/ |
125 |
> |
Iterator<E> iterator(); |
126 |
> |
|
127 |
> |
/** |
128 |
> |
* Returns an iterator over the elements in this set, in descending order. |
129 |
> |
* |
130 |
> |
* @return an iterator over the elements in this set, in descending order |
131 |
|
*/ |
132 |
|
Iterator<E> descendingIterator(); |
133 |
|
|