Top Description Fields Constructors Methods
com.google.common.collect

pack-priv final Class DescendingImmutableSortedSet<E>

extends ImmutableSortedSet<E>
Class Inheritance
Annotations
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtIncompatible, javax.annotation.CheckForNull

Skeletal implementation of ImmutableSortedSet#descendingSet().
Author
Louis Wasserman

Field Summary

Modifier and TypeField and Description
private final ImmutableSortedSet<E>
Inherited from com.google.common.collect.ImmutableSortedSet:
comparatordescendingSetSPLITERATOR_CHARACTERISTICS

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public E
ceiling(E
the value to match
element
)

Overrides com.google.common.collect.ImmutableSortedSet.ceiling.

Implements java.util.NavigableSet.ceiling.

Returns the least element in this set greater than or equal to the given element, or null if there is no such element.
public boolean
contains(Object
element whose presence in this set is to be tested
object
)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Returns true if this set contains the specified element.
pack-priv ImmutableSortedSet<E>
public UnmodifiableIterator<E>
descendingIterator()

Implements abstract com.google.common.collect.ImmutableSortedSet.descendingIterator.

Implements java.util.NavigableSet.descendingIterator.

Returns an iterator over the elements in this set, in descending order.
public ImmutableSortedSet<E>
descendingSet()

Overrides com.google.common.collect.ImmutableSortedSet.descendingSet.

Implements java.util.NavigableSet.descendingSet.

Returns a reverse order view of the elements contained in this set.
public E
floor(E
the value to match
element
)

Overrides com.google.common.collect.ImmutableSortedSet.floor.

Implements java.util.NavigableSet.floor.

Returns the greatest element in this set less than or equal to the given element, or null if there is no such element.
pack-priv ImmutableSortedSet<E>
headSetImpl(E toElement, boolean inclusive)

Implements abstract com.google.common.collect.ImmutableSortedSet.headSetImpl.

public E
higher(E
the value to match
element
)

Overrides com.google.common.collect.ImmutableSortedSet.higher.

Implements java.util.NavigableSet.higher.

Returns the least element in this set strictly greater than the given element, or null if there is no such element.
pack-priv int
indexOf(Object target)

Implements abstract com.google.common.collect.ImmutableSortedSet.indexOf.

Returns the position of an element within the set, or -1 if not present.
pack-priv boolean
isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
public UnmodifiableIterator<E>
public E
lower(E
the value to match
element
)

Overrides com.google.common.collect.ImmutableSortedSet.lower.

Implements java.util.NavigableSet.lower.

Returns the greatest element in this set strictly less than the given element, or null if there is no such element.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Returns the number of elements in this set (its cardinality).
pack-priv ImmutableSortedSet<E>
subSetImpl(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)

Implements abstract com.google.common.collect.ImmutableSortedSet.subSetImpl.

pack-priv ImmutableSortedSet<E>
tailSetImpl(E fromElement, boolean inclusive)

Implements abstract com.google.common.collect.ImmutableSortedSet.tailSetImpl.

Inherited from com.google.common.collect.ImmutableSortedSet:
comparatorconstructcopyOfcopyOfcopyOfcopyOfcopyOfcopyOfcopyOfcopyOfSortedemptySetfirstheadSetheadSetlastnaturalOrderofofofofofofoforderedBypollFirstpollLastreverseOrderspliteratorsubSetsubSettailSettailSettoImmutableSortedSetunsafeCompareunsafeComparewriteReplace

Field Detail

forwardback to summary
private final ImmutableSortedSet<E> forward

Constructor Detail

DescendingImmutableSortedSetback to summary
pack-priv DescendingImmutableSortedSet(ImmutableSortedSet<E> forward)

Method Detail

ceilingback to summary
public E ceiling(E element)

Overrides com.google.common.collect.ImmutableSortedSet.ceiling.

Implements java.util.NavigableSet.ceiling.

Doc from java.util.NavigableSet.ceiling.

Returns the least element in this set greater than or equal to the given element, or null if there is no such element.

Parameters
element:E

the value to match

Returns:E

the least element greater than or equal to e, or null if there is no such element

Annotations
@Override
@CheckForNull
containsback to summary
public boolean contains(Object object)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Doc from java.util.Set.contains.

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that Objects.equals(o, e).

Parameters
object:Object

element whose presence in this set is to be tested

Returns:boolean

true if this set contains the specified element

Annotations
@Override
createDescendingSetback to summary
pack-priv ImmutableSortedSet<E> createDescendingSet()

Implements abstract com.google.common.collect.ImmutableSortedSet.createDescendingSet.

Annotations
@Override
@GwtIncompatible:NavigableSet
descendingIteratorback to summary
public UnmodifiableIterator<E> descendingIterator()

Implements abstract com.google.common.collect.ImmutableSortedSet.descendingIterator.

Implements java.util.NavigableSet.descendingIterator.

Doc from java.util.NavigableSet.descendingIterator.

Returns an iterator over the elements in this set, in descending order. Equivalent in effect to descendingSet().iterator().

Returns:UnmodifiableIterator<E>

an iterator over the elements in this set, in descending order

Annotations
@Override
@GwtIncompatible:NavigableSet
descendingSetback to summary
public ImmutableSortedSet<E> descendingSet()

Overrides com.google.common.collect.ImmutableSortedSet.descendingSet.

Implements java.util.NavigableSet.descendingSet.

Doc from java.util.NavigableSet.descendingSet.

Returns a reverse order view of the elements contained in this set. The descending set is backed by this set, so changes to the set are reflected in the descending set, and vice-versa. If either set is modified while an iteration over either set is in progress (except through the iterator's own remove operation), the results of the iteration are undefined.

The returned set has an ordering equivalent to Collections.reverseOrder(comparator()). The expression s.descendingSet().descendingSet() returns a view of s essentially equivalent to s.

Returns:ImmutableSortedSet<E>

a reverse order view of this set

Annotations
@Override
@GwtIncompatible:NavigableSet
floorback to summary
public E floor(E element)

Overrides com.google.common.collect.ImmutableSortedSet.floor.

Implements java.util.NavigableSet.floor.

Doc from java.util.NavigableSet.floor.

Returns the greatest element in this set less than or equal to the given element, or null if there is no such element.

Parameters
element:E

the value to match

Returns:E

the greatest element less than or equal to e, or null if there is no such element

Annotations
@Override
@CheckForNull
headSetImplback to summary
pack-priv ImmutableSortedSet<E> headSetImpl(E toElement, boolean inclusive)

Implements abstract com.google.common.collect.ImmutableSortedSet.headSetImpl.

Annotations
@Override
higherback to summary
public E higher(E element)

Overrides com.google.common.collect.ImmutableSortedSet.higher.

Implements java.util.NavigableSet.higher.

Doc from java.util.NavigableSet.higher.

Returns the least element in this set strictly greater than the given element, or null if there is no such element.

Parameters
element:E

the value to match

Returns:E

the least element greater than e, or null if there is no such element

Annotations
@Override
@CheckForNull
indexOfback to summary
pack-priv int indexOf(Object target)

Implements abstract com.google.common.collect.ImmutableSortedSet.indexOf.

Doc from com.google.common.collect.ImmutableSortedSet.indexOf.

Returns the position of an element within the set, or -1 if not present.

Annotations
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns true 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 whether copyOf implementations should make an explicit copy to avoid memory leaks.

Annotations
@Override
iteratorback to summary
public UnmodifiableIterator<E> iterator()

Implements abstract com.google.common.collect.ImmutableSortedSet.iterator.

Implements java.util.NavigableSet.iterator, com.google.common.collect.SortedIterable.iterator, java.util.Set.iterator, java.util.Collection.iterator.

Doc from java.util.NavigableSet.iterator.

Returns an iterator over the elements in this set, in ascending order.

Returns:UnmodifiableIterator<E>

an iterator over the elements in this set, in ascending order

Annotations
@Override
lowerback to summary
public E lower(E element)

Overrides com.google.common.collect.ImmutableSortedSet.lower.

Implements java.util.NavigableSet.lower.

Doc from java.util.NavigableSet.lower.

Returns the greatest element in this set strictly less than the given element, or null if there is no such element.

Parameters
element:E

the value to match

Returns:E

the greatest element less than e, or null if there is no such element

Annotations
@Override
@CheckForNull
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Doc from java.util.Set.size.

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this set (its cardinality)

Annotations
@Override
subSetImplback to summary
pack-priv ImmutableSortedSet<E> subSetImpl(E fromElement, boolean fromInclusive, E toElement, boolean toInclusive)

Implements abstract com.google.common.collect.ImmutableSortedSet.subSetImpl.

Annotations
@Override
tailSetImplback to summary
pack-priv ImmutableSortedSet<E> tailSetImpl(E fromElement, boolean inclusive)

Implements abstract com.google.common.collect.ImmutableSortedSet.tailSetImpl.

Annotations
@Override