36 |
|
* |
37 |
|
* @author Doug Lea |
38 |
|
* @param <E> the type of elements maintained by this set |
39 |
+ |
* @since 1.6 |
40 |
|
*/ |
41 |
|
public interface NavigableSet<E> extends SortedSet<E> { |
42 |
|
/** |
43 |
|
* Returns an element greater than or equal to the given element, or |
44 |
|
* <tt>null</tt> if there is no such element. |
45 |
< |
* |
45 |
> |
* |
46 |
|
* @param e the value to match |
47 |
|
* @return an element greater than or equal to given element, or |
48 |
|
* <tt>null</tt> if there is no such element. |
49 |
|
* @throws ClassCastException if e cannot be compared with the elements |
50 |
|
* currently in the set. |
51 |
< |
* @throws NullPointerException if e is <tt>null</tt> |
51 |
> |
* @throws NullPointerException if e is <tt>null</tt> |
52 |
|
* and this set does not permit <tt>null</tt> elements |
53 |
|
*/ |
54 |
|
E ceiling(E e); |
56 |
|
/** |
57 |
|
* Returns an element strictly less than the given element, or |
58 |
|
* <tt>null</tt> if there is no such element. |
59 |
< |
* |
59 |
> |
* |
60 |
|
* @param e the value to match |
61 |
|
* @return the greatest element less than the given element, or |
62 |
|
* <tt>null</tt> if there is no such element. |
70 |
|
/** |
71 |
|
* Returns an element less than or equal to the given element, or |
72 |
|
* <tt>null</tt> if there is no such element. |
73 |
< |
* |
73 |
> |
* |
74 |
|
* @param e the value to match |
75 |
|
* @return the greatest element less than or equal to given |
76 |
|
* element, or <tt>null</tt> if there is no such element. |
84 |
|
/** |
85 |
|
* Returns an element strictly greater than the given element, or |
86 |
|
* <tt>null</tt> if there is no such element. |
87 |
< |
* |
87 |
> |
* |
88 |
|
* @param e the value to match |
89 |
|
* @return the least element greater than the given element, or |
90 |
|
* <tt>null</tt> if there is no such element. |
111 |
|
|
112 |
|
/** |
113 |
|
* Returns an iterator over the elements in this collection, in |
114 |
< |
* descending order. |
115 |
< |
* |
114 |
> |
* descending order. |
115 |
> |
* |
116 |
|
* @return an <tt>Iterator</tt> over the elements in this collection |
117 |
|
*/ |
118 |
|
Iterator<E> descendingIterator(); |
123 |
|
* exclusive. (If <tt>fromElement</tt> and <tt>toElement</tt> are |
124 |
|
* equal, the returned navigable set is empty.) The returned |
125 |
|
* navigable set is backed by this set, so changes in the returned |
126 |
< |
* navigable set are reflected in this set, and vice-versa. |
126 |
> |
* navigable set are reflected in this set, and vice-versa. |
127 |
|
* |
128 |
|
* @param fromElement low endpoint (inclusive) of the subSet. |
129 |
|
* @param toElement high endpoint (exclusive) of the subSet. |
137 |
|
* @throws IllegalArgumentException if <tt>fromElement</tt> is |
138 |
|
* greater than <tt>toElement</tt>. |
139 |
|
* @throws NullPointerException if <tt>fromElement</tt> or |
140 |
< |
* <tt>toElement</tt> is <tt>null</tt> |
140 |
> |
* <tt>toElement</tt> is <tt>null</tt> |
141 |
|
* and this set does not permit <tt>null</tt> elements |
142 |
|
*/ |
143 |
|
NavigableSet<E> navigableSubSet(E fromElement, E toElement); |