Class ForwardingNavigableSet<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,NavigableSet<E>,SequencedCollection<E>,SequencedSet<E>,Set<E>,SortedSet<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.
- Since:
- 12.0
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.pollLast()Deprecated.Deprecated.Deprecated.Methods inherited from class com.google.common.collect.ForwardingSortedSet
comparator, first, headSet, last, subSet, tailSetMethods inherited from class com.google.common.collect.ForwardingSet
equals, hashCodeMethods inherited from class com.google.common.collect.ForwardingCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class com.google.common.collect.ForwardingObject
toStringMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.NavigableSet
headSet, iterator, removeFirst, removeLast, reversed, subSet, tailSetMethods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from interface java.util.SortedSet
addFirst, addLast, comparator, first, getFirst, getLast, last, spliterator
-
Method Details
-
lower
Deprecated.- Specified by:
lowerin interfaceNavigableSet<E>
-
floor
Deprecated.- Specified by:
floorin interfaceNavigableSet<E>
-
ceiling
Deprecated.- Specified by:
ceilingin interfaceNavigableSet<E>
-
higher
Deprecated.- Specified by:
higherin interfaceNavigableSet<E>
-
pollFirst
Deprecated.- Specified by:
pollFirstin interfaceNavigableSet<E>
-
pollLast
Deprecated.- Specified by:
pollLastin interfaceNavigableSet<E>
-
descendingSet
Deprecated.- Specified by:
descendingSetin interfaceNavigableSet<E>
-
descendingIterator
Deprecated.- Specified by:
descendingIteratorin interfaceNavigableSet<E>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) Deprecated.- Specified by:
subSetin interfaceNavigableSet<E>
-
headSet
Deprecated.- Specified by:
headSetin interfaceNavigableSet<E>
-
tailSet
Deprecated.- Specified by:
tailSetin interfaceNavigableSet<E>
-