Package com.google.common.collect
Class DescendingImmutableSortedSet<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.ImmutableCollection<E>
-
- com.google.common.collect.ImmutableSet<E>
-
- com.google.common.collect.ImmutableSortedSetFauxverideShim<E>
-
- com.google.common.collect.ImmutableSortedSet<E>
-
- com.google.common.collect.DescendingImmutableSortedSet<E>
-
- All Implemented Interfaces:
SortedIterable<E>
,java.io.Serializable
,java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.NavigableSet<E>
,java.util.Set<E>
,java.util.SortedSet<E>
@GwtIncompatible final class DescendingImmutableSortedSet<E> extends ImmutableSortedSet<E>
Skeletal implementation ofImmutableSortedSet.descendingSet()
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableSortedSet
ImmutableSortedSet.Builder<E>
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableSet
ImmutableSet.Indexed<E>
-
-
Field Summary
Fields Modifier and Type Field Description private ImmutableSortedSet<E>
forward
-
Fields inherited from class com.google.common.collect.ImmutableSortedSet
comparator, descendingSet, SPLITERATOR_CHARACTERISTICS
-
Fields inherited from class com.google.common.collect.ImmutableSet
HASH_FLOODING_FPP, MAX_RUN_MULTIPLIER, MAX_TABLE_SIZE
-
-
Constructor Summary
Constructors Constructor Description DescendingImmutableSortedSet(ImmutableSortedSet<E> forward)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
ceiling(E element)
boolean
contains(java.lang.Object object)
(package private) ImmutableSortedSet<E>
createDescendingSet()
UnmodifiableIterator<E>
descendingIterator()
ImmutableSortedSet<E>
descendingSet()
E
floor(E element)
(package private) ImmutableSortedSet<E>
headSetImpl(E toElement, boolean inclusive)
E
higher(E element)
(package private) int
indexOf(java.lang.Object target)
Returns the position of an element within the set, or -1 if not present.(package private) boolean
isPartialView()
Returnstrue
if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.UnmodifiableIterator<E>
iterator()
Returns an unmodifiable iterator across the elements in this collection.E
lower(E element)
int
size()
(package private) ImmutableSortedSet<E>
subSetImpl(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
(package private) ImmutableSortedSet<E>
tailSetImpl(E fromElement, boolean inclusive)
-
Methods inherited from class com.google.common.collect.ImmutableSortedSet
comparator, construct, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOfSorted, emptySet, first, headSet, headSet, last, naturalOrder, of, of, of, of, of, of, of, orderedBy, pollFirst, pollLast, reverseOrder, spliterator, subSet, subSet, tailSet, tailSet, toImmutableSortedSet, unsafeCompare, unsafeCompare, writeReplace
-
Methods inherited from class com.google.common.collect.ImmutableSortedSetFauxverideShim
builder, builderWithExpectedSize, copyOf, of, of, of, of, of, of, toImmutableSet
-
Methods inherited from class com.google.common.collect.ImmutableSet
asList, chooseTableSize, createAsList, equals, hashCode, hashFloodingDetected, isHashCodeFast, maxRunBeforeFallback, rebuildHashTable
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, remove, removeAll, removeIf, retainAll, toArray, toArray
-
-
-
-
Field Detail
-
forward
private final ImmutableSortedSet<E> forward
-
-
Constructor Detail
-
DescendingImmutableSortedSet
DescendingImmutableSortedSet(ImmutableSortedSet<E> forward)
-
-
Method Detail
-
contains
public boolean contains(java.lang.Object object)
- Specified by:
contains
in interfacejava.util.Collection<E>
- Specified by:
contains
in interfacejava.util.Set<E>
- Specified by:
contains
in classImmutableCollection<E>
-
size
public int size()
-
iterator
public UnmodifiableIterator<E> iterator()
Description copied from class:ImmutableCollection
Returns an unmodifiable iterator across the elements in this collection.- Specified by:
iterator
in interfacejava.util.Collection<E>
- Specified by:
iterator
in interfacejava.lang.Iterable<E>
- Specified by:
iterator
in interfacejava.util.NavigableSet<E>
- Specified by:
iterator
in interfacejava.util.Set<E>
- Specified by:
iterator
in interfaceSortedIterable<E>
- Specified by:
iterator
in classImmutableSortedSet<E>
-
headSetImpl
ImmutableSortedSet<E> headSetImpl(E toElement, boolean inclusive)
- Specified by:
headSetImpl
in classImmutableSortedSet<E>
-
subSetImpl
ImmutableSortedSet<E> subSetImpl(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)
- Specified by:
subSetImpl
in classImmutableSortedSet<E>
-
tailSetImpl
ImmutableSortedSet<E> tailSetImpl(E fromElement, boolean inclusive)
- Specified by:
tailSetImpl
in classImmutableSortedSet<E>
-
descendingSet
@GwtIncompatible("NavigableSet") public ImmutableSortedSet<E> descendingSet()
- Specified by:
descendingSet
in interfacejava.util.NavigableSet<E>
- Overrides:
descendingSet
in classImmutableSortedSet<E>
-
descendingIterator
@GwtIncompatible("NavigableSet") public UnmodifiableIterator<E> descendingIterator()
- Specified by:
descendingIterator
in interfacejava.util.NavigableSet<E>
- Specified by:
descendingIterator
in classImmutableSortedSet<E>
-
createDescendingSet
@GwtIncompatible("NavigableSet") ImmutableSortedSet<E> createDescendingSet()
- Specified by:
createDescendingSet
in classImmutableSortedSet<E>
-
lower
public E lower(E element)
- Specified by:
lower
in interfacejava.util.NavigableSet<E>
- Overrides:
lower
in classImmutableSortedSet<E>
-
floor
public E floor(E element)
- Specified by:
floor
in interfacejava.util.NavigableSet<E>
- Overrides:
floor
in classImmutableSortedSet<E>
-
ceiling
public E ceiling(E element)
- Specified by:
ceiling
in interfacejava.util.NavigableSet<E>
- Overrides:
ceiling
in classImmutableSortedSet<E>
-
higher
public E higher(E element)
- Specified by:
higher
in interfacejava.util.NavigableSet<E>
- Overrides:
higher
in classImmutableSortedSet<E>
-
indexOf
int indexOf(java.lang.Object target)
Description copied from class:ImmutableSortedSet
Returns the position of an element within the set, or -1 if not present.- Specified by:
indexOf
in classImmutableSortedSet<E>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollection
Returnstrue
if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whethercopyOf
implementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialView
in classImmutableCollection<E>
-
-