Class ForwardingNavigableSet.StandardDescendingSet
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingCollection<E>
com.google.common.collect.ForwardingSet<E>
com.google.common.collect.ForwardingSortedSet<E>
com.google.common.collect.ForwardingNavigableSet<E>
com.google.common.collect.ForwardingNavigableSet.StandardDescendingSet
- All Implemented Interfaces:
Iterable<E>, Collection<E>, NavigableSet<E>, SequencedCollection<E>, SequencedSet<E>, Set<E>, SortedSet<E>
- Enclosing class:
ForwardingNavigableSet<E extends @Nullable Object>
A sensible implementation of
NavigableSet.descendingSet() in terms of the other methods
of NavigableSet, notably including NavigableSet.descendingIterator().
In many cases, you may wish to override ForwardingNavigableSet.descendingSet() to
forward to this implementation or a subclass thereof.
- Since:
- 12.0
- Author:
- Louis Wasserman
-
Nested Class Summary
Nested classes/interfaces inherited from class ForwardingNavigableSet
ForwardingNavigableSet.StandardDescendingSetModifier and TypeClassDescriptionprotected classA sensible implementation ofNavigableSet.descendingSet()in terms of the other methods ofNavigableSet, notably includingNavigableSet.descendingIterator(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionComparator<? super E> protected NavigableSet<E> delegate()Returns the backing delegate instance that methods are forwarded to.first()iterator()last()pollLast()toArray()toArray(T[] array) toString()Returns the string representation generated by the delegate'stoStringmethod.Methods inherited from class ForwardingNavigableSet
standardCeiling, standardFirst, standardFloor, standardHeadSet, standardHigher, standardLast, standardLower, standardPollFirst, standardPollLast, standardSubSet, standardSubSet, standardTailSetModifier and TypeMethodDescriptionprotected EstandardCeiling(E e) A sensible definition ofForwardingNavigableSet.ceiling(E)in terms of theiteratormethod ofForwardingNavigableSet.tailSet(Object, boolean).protected Eprotected EstandardFloor(E e) A sensible definition ofForwardingNavigableSet.floor(E)in terms of thedescendingIteratormethod ofForwardingNavigableSet.headSet(Object, boolean).standardHeadSet(E toElement) A sensible definition ofForwardingSortedSet.headSet(Object)in terms of theForwardingNavigableSet.headSet(Object, boolean)method.protected EstandardHigher(E e) A sensible definition ofForwardingNavigableSet.higher(E)in terms of theiteratormethod ofForwardingNavigableSet.tailSet(Object, boolean).protected Eprotected EstandardLower(E e) A sensible definition ofForwardingNavigableSet.lower(E)in terms of thedescendingIteratormethod ofForwardingNavigableSet.headSet(Object, boolean).protected EA sensible definition ofForwardingNavigableSet.pollFirst()in terms of theiteratormethod.protected EA sensible definition ofForwardingNavigableSet.pollLast()in terms of thedescendingIteratormethod.protected NavigableSet<E> standardSubSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) A sensible definition ofForwardingNavigableSet.subSet(Object, boolean, Object, boolean)in terms of theheadSetandtailSetmethods.standardSubSet(E fromElement, E toElement) A sensible definition ofForwardingSortedSet.subSet(Object, Object)in terms of theForwardingNavigableSet.subSet(Object, boolean, Object, boolean)method.standardTailSet(E fromElement) A sensible definition ofForwardingSortedSet.tailSet(Object)in terms of theForwardingNavigableSet.tailSet(Object, boolean)method.Methods inherited from class ForwardingSortedSet
standardContains, standardRemoveModifier and TypeMethodDescriptionprotected booleanstandardContains(@Nullable Object object) A sensible definition ofForwardingCollection.contains(Object)in terms of thefirst()method ofForwardingSortedSet.tailSet(E).protected booleanstandardRemove(@Nullable Object object) A sensible definition ofForwardingCollection.remove(Object)in terms of theiterator()method ofForwardingSortedSet.tailSet(E).Methods inherited from class ForwardingSet
equals, hashCode, standardEquals, standardHashCode, standardRemoveAllModifier and TypeMethodDescriptionbooleaninthashCode()protected booleanstandardEquals(@Nullable Object object) A sensible definition ofForwardingSet.equals(Object)in terms ofForwardingCollection.size()andForwardingCollection.containsAll(Collection).protected intA sensible definition ofForwardingSet.hashCode()in terms ofForwardingCollection.iterator().protected booleanstandardRemoveAll(Collection<?> collection) A sensible definition ofForwardingCollection.removeAll(Collection)in terms ofForwardingCollection.iterator()andForwardingCollection.remove(Object).Methods inherited from class ForwardingCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContainsAll, standardIsEmpty, standardRetainAll, standardToArray, standardToArray, standardToStringModifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> collection) voidclear()booleanbooleancontainsAll(Collection<?> collection) booleanisEmpty()booleanbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) intsize()protected booleanstandardAddAll(Collection<? extends E> collection) A sensible definition ofForwardingCollection.addAll(Collection)in terms ofForwardingCollection.add(E).protected voidA sensible definition ofForwardingCollection.clear()in terms ofForwardingCollection.iterator(), using the iterator'sremovemethod.protected booleanstandardContainsAll(Collection<?> collection) A sensible definition ofForwardingCollection.containsAll(Collection)in terms ofForwardingCollection.contains(Object).protected booleanA sensible definition ofForwardingCollection.isEmpty()as!iterator().hasNext.protected booleanstandardRetainAll(Collection<?> collection) A sensible definition ofForwardingCollection.retainAll(Collection)in terms ofForwardingCollection.iterator(), using the iterator'sremovemethod.A sensible definition ofForwardingCollection.toArray()in terms ofForwardingCollection.toArray(Object[]).standardToArray(T[] array) A sensible definition ofForwardingCollection.toArray(Object[])in terms ofForwardingCollection.size()andForwardingCollection.iterator().protected StringA sensible definition ofForwardingObject.toString()in terms ofForwardingCollection.iterator().Methods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface NavigableSet
removeFirst, removeLast, reversed
-
Constructor Details
-
StandardDescendingSet
public StandardDescendingSet()Constructor for use by subclasses.
-
-
Method Details
-
delegate
Description copied from class:ForwardingObjectReturns the backing delegate instance that methods are forwarded to. Abstract subclasses generally override this method with an abstract method that has a more specific return type, such asForwardingSet.delegate(). Concrete subclasses override this method to supply the instance being decorated.- Specified by:
delegatein classForwardingNavigableSet<E extends @Nullable Object>
-
lower
- Specified by:
lowerin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
lowerin classForwardingNavigableSet<E extends @Nullable Object>
-
floor
- Specified by:
floorin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
floorin classForwardingNavigableSet<E extends @Nullable Object>
-
ceiling
- Specified by:
ceilingin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
ceilingin classForwardingNavigableSet<E extends @Nullable Object>
-
higher
- Specified by:
higherin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
higherin classForwardingNavigableSet<E extends @Nullable Object>
-
pollFirst
- Specified by:
pollFirstin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
pollFirstin classForwardingNavigableSet<E extends @Nullable Object>
-
pollLast
- Specified by:
pollLastin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
pollLastin classForwardingNavigableSet<E extends @Nullable Object>
-
descendingSet
- Specified by:
descendingSetin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
descendingSetin classForwardingNavigableSet<E extends @Nullable Object>
-
descendingIterator
- Specified by:
descendingIteratorin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
descendingIteratorin classForwardingNavigableSet<E extends @Nullable Object>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSetin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
subSetin classForwardingNavigableSet<E extends @Nullable Object>
-
subSet
-
headSet
- Specified by:
headSetin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
headSetin classForwardingNavigableSet<E extends @Nullable Object>
-
headSet
-
tailSet
- Specified by:
tailSetin interfaceNavigableSet<E extends @Nullable Object>- Overrides:
tailSetin classForwardingNavigableSet<E extends @Nullable Object>
-
tailSet
-
comparator
- Specified by:
comparatorin interfaceSortedSet<E extends @Nullable Object>- Overrides:
comparatorin classForwardingSortedSet<E extends @Nullable Object>
-
first
-
last
-
iterator
- Specified by:
iteratorin interfaceCollection<E extends @Nullable Object>- Specified by:
iteratorin interfaceIterable<E extends @Nullable Object>- Specified by:
iteratorin interfaceNavigableSet<E extends @Nullable Object>- Specified by:
iteratorin interfaceSet<E extends @Nullable Object>- Overrides:
iteratorin classForwardingCollection<E extends @Nullable Object>
-
toArray
-
toArray
-
toString
Description copied from class:ForwardingObjectReturns the string representation generated by the delegate'stoStringmethod.- Overrides:
toStringin classForwardingObject
-