Example usage for Java java.util NavigableSet fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | add(E e) Adds the specified element to this set if it is not already present (optional operation). |
boolean | addAll(Collection extends E> c) Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
E | ceiling(E e) Returns the least element in this set greater than or equal to the given element, or null if there is no such element. |
void | clear() Removes all of the elements from this set (optional operation). |
boolean | contains(Object o) Returns true if this set contains the specified element. |
Iterator | descendingIterator() Returns an iterator over the elements in this set, in descending order. |
NavigableSet | descendingSet() Returns a reverse order view of the elements contained in this set. |
E | first() Returns the first (lowest) element currently in this set. |
E | floor(E e) Returns the greatest element in this set less than or equal to the given element, or null if there is no such element. |
NavigableSet | headSet(E toElement, boolean inclusive) Returns a view of the portion of this set whose elements are less than (or equal to, if inclusive is true) toElement . |
SortedSet | headSet(E toElement) Equivalent to headSet(toElement, false) . |
E | higher(E e) Returns the least element in this set strictly greater than the given element, or null if there is no such element. |
boolean | isEmpty() Returns true if this set contains no elements. |
Iterator | iterator() Returns an iterator over the elements in this set, in ascending order. |
E | last() Returns the last (highest) element currently in this set. |
E | lower(E e) Returns the greatest element in this set strictly less than the given element, or null if there is no such element. |
E | pollFirst() Retrieves and removes the first (lowest) element, or returns null if this set is empty. |
E | pollLast() Retrieves and removes the last (highest) element, or returns null if this set is empty. |
boolean | remove(Object o) Removes the specified element from this set if it is present (optional operation). |
boolean | removeAll(Collection> c) Removes from this set all of its elements that are contained in the specified collection (optional operation). |
boolean | removeIf(Predicate super E> filter) Removes all of the elements of this collection that satisfy the given predicate. |
boolean | retainAll(Collection> c) Retains only the elements in this set that are contained in the specified collection (optional operation). |
int | size() Returns the number of elements in this set (its cardinality). |
Stream | stream() Returns a sequential Stream with this collection as its source. |
SortedSet | subSet(E fromElement, E toElement) Equivalent to subSet(fromElement, true, toElement, false) . |
NavigableSet | tailSet(E fromElement, boolean inclusive) Returns a view of the portion of this set whose elements are greater than (or equal to, if inclusive is true) fromElement . |
SortedSet | tailSet(E fromElement) Equivalent to tailSet(fromElement, true) . |
Object[] | toArray() Returns an array containing all of the elements in this set. |