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:
java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.NavigableSet<E>
,java.util.Set<E>
,java.util.SortedSet<E>
- Enclosing class:
- ForwardingNavigableSet<E extends @Nullable java.lang.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)
java.util.Comparator<? super E>
comparator()
protected java.util.NavigableSet<E>
delegate()
Returns the backing delegate instance that methods are forwarded to.java.util.Iterator<E>
descendingIterator()
java.util.NavigableSet<E>
descendingSet()
E
first()
E
floor(E e)
java.util.SortedSet<E>
headSet(E toElement)
java.util.NavigableSet<E>
headSet(E toElement, boolean inclusive)
E
higher(E e)
java.util.Iterator<E>
iterator()
E
last()
E
lower(E e)
E
pollFirst()
E
pollLast()
java.util.NavigableSet<E>
subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
java.util.SortedSet<E>
subSet(E fromElement, E toElement)
java.util.SortedSet<E>
tailSet(E fromElement)
java.util.NavigableSet<E>
tailSet(E fromElement, boolean inclusive)
@Nullable java.lang.Object[]
toArray()
<T extends @Nullable java.lang.Object>
T[]toArray(T[] array)
java.lang.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
-
-
-
-
Constructor Detail
-
StandardDescendingSet
public StandardDescendingSet()
Constructor for use by subclasses.
-
-
Method Detail
-
delegate
protected java.util.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 java.lang.Object>
-
lower
@CheckForNull public E lower(E e)
- Specified by:
lower
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
lower
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
floor
@CheckForNull public E floor(E e)
- Specified by:
floor
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
floor
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
ceiling
@CheckForNull public E ceiling(E e)
- Specified by:
ceiling
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
ceiling
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
higher
@CheckForNull public E higher(E e)
- Specified by:
higher
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
higher
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
pollFirst
@CheckForNull public E pollFirst()
- Specified by:
pollFirst
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
pollFirst
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
pollLast
@CheckForNull public E pollLast()
- Specified by:
pollLast
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
pollLast
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
descendingSet
public java.util.NavigableSet<E> descendingSet()
- Specified by:
descendingSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
descendingSet
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
descendingIterator
public java.util.Iterator<E> descendingIterator()
- Specified by:
descendingIterator
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
descendingIterator
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
subSet
public java.util.NavigableSet<E> subSet(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
- Specified by:
subSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
subSet
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
subSet
public java.util.SortedSet<E> subSet(E fromElement, E toElement)
- Specified by:
subSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Specified by:
subSet
in interfacejava.util.SortedSet<E extends @Nullable java.lang.Object>
- Overrides:
subSet
in classForwardingSortedSet<E extends @Nullable java.lang.Object>
-
headSet
public java.util.NavigableSet<E> headSet(E toElement, boolean inclusive)
- Specified by:
headSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
headSet
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
headSet
public java.util.SortedSet<E> headSet(E toElement)
- Specified by:
headSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Specified by:
headSet
in interfacejava.util.SortedSet<E extends @Nullable java.lang.Object>
- Overrides:
headSet
in classForwardingSortedSet<E extends @Nullable java.lang.Object>
-
tailSet
public java.util.NavigableSet<E> tailSet(E fromElement, boolean inclusive)
- Specified by:
tailSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Overrides:
tailSet
in classForwardingNavigableSet<E extends @Nullable java.lang.Object>
-
tailSet
public java.util.SortedSet<E> tailSet(E fromElement)
- Specified by:
tailSet
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Specified by:
tailSet
in interfacejava.util.SortedSet<E extends @Nullable java.lang.Object>
- Overrides:
tailSet
in classForwardingSortedSet<E extends @Nullable java.lang.Object>
-
comparator
public java.util.Comparator<? super E> comparator()
- Specified by:
comparator
in interfacejava.util.SortedSet<E extends @Nullable java.lang.Object>
- Overrides:
comparator
in classForwardingSortedSet<E extends @Nullable java.lang.Object>
-
first
public E first()
- Specified by:
first
in interfacejava.util.SortedSet<E extends @Nullable java.lang.Object>
- Overrides:
first
in classForwardingSortedSet<E extends @Nullable java.lang.Object>
-
last
public E last()
- Specified by:
last
in interfacejava.util.SortedSet<E extends @Nullable java.lang.Object>
- Overrides:
last
in classForwardingSortedSet<E extends @Nullable java.lang.Object>
-
iterator
public java.util.Iterator<E> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<E extends @Nullable java.lang.Object>
- Specified by:
iterator
in interfacejava.lang.Iterable<E extends @Nullable java.lang.Object>
- Specified by:
iterator
in interfacejava.util.NavigableSet<E extends @Nullable java.lang.Object>
- Specified by:
iterator
in interfacejava.util.Set<E extends @Nullable java.lang.Object>
- Overrides:
iterator
in classForwardingCollection<E extends @Nullable java.lang.Object>
-
toArray
public @Nullable java.lang.Object[] toArray()
- Specified by:
toArray
in interfacejava.util.Collection<E extends @Nullable java.lang.Object>
- Specified by:
toArray
in interfacejava.util.Set<E extends @Nullable java.lang.Object>
- Overrides:
toArray
in classForwardingCollection<E extends @Nullable java.lang.Object>
-
toArray
public <T extends @Nullable java.lang.Object> T[] toArray(T[] array)
- Specified by:
toArray
in interfacejava.util.Collection<E extends @Nullable java.lang.Object>
- Specified by:
toArray
in interfacejava.util.Set<E extends @Nullable java.lang.Object>
- Overrides:
toArray
in classForwardingCollection<E extends @Nullable java.lang.Object>
-
toString
public java.lang.String toString()
Description copied from class:ForwardingObject
Returns the string representation generated by the delegate'stoString
method.- Overrides:
toString
in classForwardingObject
-
-