E
- the type of elementpublic interface NavigableSet<E> extends SortedSet<E>
Modifier and Type | Method and Description |
---|---|
E |
ceiling(E e)
Answers the smallest element bigger than or equal to the specified one,
or null if no such element.
|
Iterator<E> |
descendingIterator()
Answers a descending iterator of this set.
|
NavigableSet<E> |
descendingSet()
Answers a reverse order view of this set.
|
E |
floor(E e)
Answers the biggest element less than or equal to the specified one, or
null if no such element.
|
NavigableSet<E> |
headSet(E end,
boolean endInclusive)
Answers a NavigableSet of the specified portion of this set which
contains elements less than (or equal to, depends on endInclusive) the
end element.
|
E |
higher(E e)
Answers the smallest element bigger than the specified one, or null if no
such element.
|
E |
lower(E e)
Answers the biggest element less than the specified one, or null if no
such element.
|
E |
pollFirst()
Deletes and answers the smallest element, or null if the set is empty.
|
E |
pollLast()
Deletes and answers the biggest element, or null if the set is empty.
|
NavigableSet<E> |
subSet(E start,
boolean startInclusive,
E end,
boolean endInclusive)
Answers a NavigableSet of the specified portion of this set which
contains elements greater (or equal to, depends on startInclusive) the
start element but less than (or equal to, depends on endInclusive) the
end element.
|
NavigableSet<E> |
tailSet(E start,
boolean startInclusive)
Answers a NavigableSet of the specified portion of this set which
contains elements greater (or equal to, depends on startInclusive) the
start element.
|
E pollFirst()
E pollLast()
E higher(E e)
e
- the specified elementClassCastException
- if the element cannot be compared with the ones in the setNullPointerException
- if the element is null and the set can not contain nullE ceiling(E e)
e
- the specified elementClassCastException
- if the element cannot be compared with the ones in the setNullPointerException
- if the element is null and the set can not contain nullE lower(E e)
e
- the specified elementClassCastException
- if the element cannot be compared with the ones in the setNullPointerException
- if the element is null and the set can not contain nullE floor(E e)
e
- the specified elementClassCastException
- if the element cannot be compared with the ones in the setNullPointerException
- if the element is null and the set can not contain nullIterator<E> descendingIterator()
NavigableSet<E> descendingSet()
NavigableSet<E> subSet(E start, boolean startInclusive, E end, boolean endInclusive)
start
- the start elementstartInclusive
- true if the start element is in the returned setend
- the end elementendInclusive
- true if the end element is in the returned setClassCastException
- when the start or end object cannot be compared with the
elements in this setNullPointerException
- when the start or end object is null and the set cannot
contain nullIllegalArgumentException
- when the start is bigger than end; or start or end is out of
range and the set has a rangeNavigableSet<E> headSet(E end, boolean endInclusive)
end
- the end elementendInclusive
- true if the end element is in the returned setClassCastException
- when the end object cannot be compared with the elements in
this setNullPointerException
- when the end object is null and the set cannot contain handle
nullIllegalArgumentException
- when end is out of range and the set has a rangeNavigableSet<E> tailSet(E start, boolean startInclusive)
start
- the start elementstartInclusive
- true if the start element is in the returned setClassCastException
- when the start object cannot be compared with the elements in
this setNullPointerException
- when the start object is null and the set cannot contain nullIllegalArgumentException
- when start is out of range and the set has a range