Package com.google.common.collect
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>
@Beta
protected class ForwardingNavigableSet.StandardDescendingSet
extends ForwardingNavigableSet<E>
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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ForwardingNavigableSet
ForwardingNavigableSet.StandardDescendingSet
-
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()
Object[]
toArray()
<T> T[]
toArray
(T[] array) toString()
Returns the string representation generated by the delegate'stoString
method.Methods inherited from class com.google.common.collect.ForwardingNavigableSet
standardCeiling, standardFirst, standardFloor, standardHeadSet, standardHigher, standardLast, standardLower, standardPollFirst, standardPollLast, standardSubSet, standardSubSet, standardTailSet
Methods inherited from class com.google.common.collect.ForwardingSortedSet
standardContains, standardRemove
Methods inherited from class com.google.common.collect.ForwardingSet
equals, hashCode, standardEquals, standardHashCode, standardRemoveAll
Methods inherited from class com.google.common.collect.ForwardingCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContainsAll, standardIsEmpty, standardRetainAll, standardToArray, standardToArray, standardToString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.NavigableSet
removeFirst, removeLast, reversed
-
Constructor Details
-
StandardDescendingSet
public StandardDescendingSet()Constructor for use by subclasses.
-
-
Method Details
-
delegate
Description copied from class:ForwardingObject
Returns 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:
delegate
in classForwardingNavigableSet<E>
-
lower
- Specified by:
lower
in interfaceNavigableSet<E>
- Overrides:
lower
in classForwardingNavigableSet<E>
-
floor
- Specified by:
floor
in interfaceNavigableSet<E>
- Overrides:
floor
in classForwardingNavigableSet<E>
-
ceiling
- Specified by:
ceiling
in interfaceNavigableSet<E>
- Overrides:
ceiling
in classForwardingNavigableSet<E>
-
higher
- Specified by:
higher
in interfaceNavigableSet<E>
- Overrides:
higher
in classForwardingNavigableSet<E>
-
pollFirst
- Specified by:
pollFirst
in interfaceNavigableSet<E>
- Overrides:
pollFirst
in classForwardingNavigableSet<E>
-
pollLast
- Specified by:
pollLast
in interfaceNavigableSet<E>
- Overrides:
pollLast
in classForwardingNavigableSet<E>
-
descendingSet
- Specified by:
descendingSet
in interfaceNavigableSet<E>
- Overrides:
descendingSet
in classForwardingNavigableSet<E>
-
descendingIterator
- Specified by:
descendingIterator
in interfaceNavigableSet<E>
- Overrides:
descendingIterator
in classForwardingNavigableSet<E>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive) - Specified by:
subSet
in interfaceNavigableSet<E>
- Overrides:
subSet
in classForwardingNavigableSet<E>
-
headSet
- Specified by:
headSet
in interfaceNavigableSet<E>
- Overrides:
headSet
in classForwardingNavigableSet<E>
-
tailSet
- Specified by:
tailSet
in interfaceNavigableSet<E>
- Overrides:
tailSet
in classForwardingNavigableSet<E>
-
comparator
- Specified by:
comparator
in interfaceSortedSet<E>
- Overrides:
comparator
in classForwardingSortedSet<E>
-
first
- Specified by:
first
in interfaceSortedSet<E>
- Overrides:
first
in classForwardingSortedSet<E>
-
headSet
- Specified by:
headSet
in interfaceNavigableSet<E>
- Specified by:
headSet
in interfaceSortedSet<E>
- Overrides:
headSet
in classForwardingSortedSet<E>
-
last
- Specified by:
last
in interfaceSortedSet<E>
- Overrides:
last
in classForwardingSortedSet<E>
-
subSet
- Specified by:
subSet
in interfaceNavigableSet<E>
- Specified by:
subSet
in interfaceSortedSet<E>
- Overrides:
subSet
in classForwardingSortedSet<E>
-
tailSet
- Specified by:
tailSet
in interfaceNavigableSet<E>
- Specified by:
tailSet
in interfaceSortedSet<E>
- Overrides:
tailSet
in classForwardingSortedSet<E>
-
iterator
- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<E>
- Specified by:
iterator
in interfaceNavigableSet<E>
- Specified by:
iterator
in interfaceSet<E>
- Overrides:
iterator
in classForwardingCollection<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
- Specified by:
toArray
in interfaceSet<E>
- Overrides:
toArray
in classForwardingCollection<E>
-
toArray
public <T> T[] toArray(T[] array) - Specified by:
toArray
in interfaceCollection<E>
- Specified by:
toArray
in interfaceSet<E>
- Overrides:
toArray
in classForwardingCollection<E>
-
toString
Description copied from class:ForwardingObject
Returns the string representation generated by the delegate'stoString
method.- Overrides:
toString
in classForwardingObject
-