public abstract class ForwardingNavigableSet<E> extends ForwardingSortedSet<E> implements NavigableSet<E>
Warning: The methods of ForwardingNavigableSet forward indiscriminately
to the methods of the delegate. For example, overriding ForwardingCollection.add(E) alone will not
change the behavior of ForwardingCollection.addAll(java.util.Collection<? extends E>), which can lead to unexpected behavior. In this case, you
should override addAll as well, either providing your own implementation, or delegating
to the provided standardAddAll method.
Each of the standard methods uses the set's comparator (or the natural ordering of
the elements, if there is no comparator) to test element equality. As a result, if the
comparator is not consistent with equals, some of the standard implementations may violate the
Set contract.
The standard methods and the collection views they return are not guaranteed to be
thread-safe, even when all of the methods that they depend on are thread-safe.
| Modifier and Type | Method and Description |
|---|---|
E |
ceiling(E e) |
Iterator<E> |
descendingIterator() |
NavigableSet<E> |
descendingSet() |
E |
floor(E e) |
NavigableSet<E> |
headSet(E toElement,
boolean inclusive) |
E |
higher(E e) |
E |
lower(E e) |
E |
pollFirst() |
E |
pollLast() |
NavigableSet<E> |
subSet(E fromElement,
boolean fromInclusive,
E toElement,
boolean toInclusive) |
NavigableSet<E> |
tailSet(E fromElement,
boolean inclusive) |
comparator, first, headSet, last, subSet, tailSetequals, hashCodeadd, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArraytoStringheadSet, iterator, subSet, tailSetcomparator, first, last, spliteratoradd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayparallelStream, removeIf, streampublic E lower(E e)
lower in interface NavigableSet<E>public E floor(E e)
floor in interface NavigableSet<E>public E ceiling(E e)
ceiling in interface NavigableSet<E>public E higher(E e)
higher in interface NavigableSet<E>public E pollFirst()
pollFirst in interface NavigableSet<E>public E pollLast()
pollLast in interface NavigableSet<E>public NavigableSet<E> descendingSet()
descendingSet in interface NavigableSet<E>public Iterator<E> descendingIterator()
descendingIterator in interface NavigableSet<E>public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
subSet in interface NavigableSet<E>public NavigableSet<E> headSet(E toElement, boolean inclusive)
headSet in interface NavigableSet<E>public NavigableSet<E> tailSet(E fromElement, boolean inclusive)
tailSet in interface NavigableSet<E>Copyright © 2010 - 2020 Adobe. All Rights Reserved