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>
,Set<E>
,SortedSet<E>
- Enclosing class:
- ForwardingNavigableSet<E extends @Nullable Object>
protected class ForwardingNavigableSet.StandardDescendingSet extends ForwardingNavigableSet<E>
A sensible implementation ofNavigableSet.descendingSet()
in terms of the other methods ofNavigableSet
, notably includingNavigableSet.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 Constructor Description StandardDescendingSet()
Constructor for use by subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
ceiling(E e)
Comparator<? super E>
comparator()
protected NavigableSet<E>
delegate()
Returns the backing delegate instance that methods are forwarded to.Iterator<E>
descendingIterator()
NavigableSet<E>
descendingSet()
E
first()
E
floor(E e)
SortedSet<E>
headSet(E toElement)
NavigableSet<E>
headSet(E toElement, boolean inclusive)
E
higher(E e)
Iterator<E>
iterator()
E
last()
E
lower(E e)
E
pollFirst()
E
pollLast()
NavigableSet<E>
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
SortedSet<E>
subSet(E fromElement, E toElement)
SortedSet<E>
tailSet(E fromElement)
NavigableSet<E>
tailSet(E fromElement, boolean inclusive)
@Nullable Object[]
toArray()
<T extends @Nullable Object>
T[]toArray(T[] array)
String
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.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Constructor Detail
-
StandardDescendingSet
public StandardDescendingSet()
Constructor for use by subclasses.
-
-
Method Detail
-
delegate
protected NavigableSet<E> 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 extends @Nullable Object>
-
lower
@CheckForNull public E lower(E e)
- Specified by:
lower
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
lower
in classForwardingNavigableSet<E extends @Nullable Object>
-
floor
@CheckForNull public E floor(E e)
- Specified by:
floor
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
floor
in classForwardingNavigableSet<E extends @Nullable Object>
-
ceiling
@CheckForNull public E ceiling(E e)
- Specified by:
ceiling
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
ceiling
in classForwardingNavigableSet<E extends @Nullable Object>
-
higher
@CheckForNull public E higher(E e)
- Specified by:
higher
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
higher
in classForwardingNavigableSet<E extends @Nullable Object>
-
pollFirst
@CheckForNull public E pollFirst()
- Specified by:
pollFirst
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
pollFirst
in classForwardingNavigableSet<E extends @Nullable Object>
-
pollLast
@CheckForNull public E pollLast()
- Specified by:
pollLast
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
pollLast
in classForwardingNavigableSet<E extends @Nullable Object>
-
descendingSet
public NavigableSet<E> descendingSet()
- Specified by:
descendingSet
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
descendingSet
in classForwardingNavigableSet<E extends @Nullable Object>
-
descendingIterator
public Iterator<E> descendingIterator()
- Specified by:
descendingIterator
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
descendingIterator
in classForwardingNavigableSet<E extends @Nullable Object>
-
subSet
public NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
- Specified by:
subSet
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
subSet
in classForwardingNavigableSet<E extends @Nullable Object>
-
subSet
public SortedSet<E> subSet(E fromElement, E toElement)
-
headSet
public NavigableSet<E> headSet(E toElement, boolean inclusive)
- Specified by:
headSet
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
headSet
in classForwardingNavigableSet<E extends @Nullable Object>
-
headSet
public SortedSet<E> headSet(E toElement)
-
tailSet
public NavigableSet<E> tailSet(E fromElement, boolean inclusive)
- Specified by:
tailSet
in interfaceNavigableSet<E extends @Nullable Object>
- Overrides:
tailSet
in classForwardingNavigableSet<E extends @Nullable Object>
-
tailSet
public SortedSet<E> tailSet(E fromElement)
-
comparator
public Comparator<? super E> comparator()
- Specified by:
comparator
in interfaceSortedSet<E extends @Nullable Object>
- Overrides:
comparator
in classForwardingSortedSet<E extends @Nullable Object>
-
first
public E first()
-
last
public E last()
-
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interfaceCollection<E extends @Nullable Object>
- Specified by:
iterator
in interfaceIterable<E extends @Nullable Object>
- Specified by:
iterator
in interfaceNavigableSet<E extends @Nullable Object>
- Specified by:
iterator
in interfaceSet<E extends @Nullable Object>
- Overrides:
iterator
in classForwardingCollection<E extends @Nullable Object>
-
toString
public String toString()
Description copied from class:ForwardingObject
Returns the string representation generated by the delegate'stoString
method.- Overrides:
toString
in classForwardingObject
-
-