Top Description Constructors Methods
com.google.common.collect

pack-priv final Class ImmutableSortedAsList<E>

extends RegularImmutableAsList<E>
implements SortedIterable<E>
Class Inheritance
All Implemented Interfaces
com.google.common.collect.SortedIterable, java.lang.Iterable
Annotations
@GwtCompatible
emulated:true
@SuppressWarnings:serial
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, .GwtIncompatible, .J2ktIncompatible, java.util.Comparator, .Spliterator, javax.annotation.CheckForNull

List returned by ImmutableSortedSet.asList() when the set isn't empty.
Authors
Jared Levy, Louis Wasserman

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Comparator<? super E>
comparator()

Implements com.google.common.collect.SortedIterable.comparator.

Returns the Comparator by which the elements of this iterable are ordered, or Ordering.natural() if the elements are ordered by their natural ordering.
public boolean
contains(Object
element whose presence in this list is to be tested
target
)

Overrides com.google.common.collect.ImmutableAsList.contains.

Implements java.util.List.contains, java.util.Collection.contains.

Returns true if this list contains the specified element.
pack-priv ImmutableSortedSet<E>
public int
indexOf(Object
element to search for
target
)

Overrides com.google.common.collect.ImmutableList.indexOf.

Implements java.util.List.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.
public int
lastIndexOf(Object
element to search for
target
)

Overrides com.google.common.collect.ImmutableList.lastIndexOf.

Implements java.util.List.lastIndexOf.

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.
public Spliterator<E>
pack-priv ImmutableList<E>
subListUnchecked(int fromIndex, int toIndex)

Overrides com.google.common.collect.ImmutableList.subListUnchecked.

Called by the default implementation of subList when toIndex - fromIndex > 1, after index validation has already been performed.
pack-priv Object
Inherited from com.google.common.collect.RegularImmutableAsList:
copyIntoArraydelegateListforEachgetinternalArrayinternalArrayEndinternalArrayStartlistIterator

Constructor Detail

ImmutableSortedAsListback to summary
pack-priv ImmutableSortedAsList(ImmutableSortedSet<E> backingSet, ImmutableList<E> backingList)

Method Detail

comparatorback to summary
public Comparator<? super E> comparator()

Implements com.google.common.collect.SortedIterable.comparator.

Doc from com.google.common.collect.SortedIterable.comparator.

Returns the Comparator by which the elements of this iterable are ordered, or Ordering.natural() if the elements are ordered by their natural ordering.

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

Overrides com.google.common.collect.ImmutableAsList.contains.

Implements java.util.List.contains, java.util.Collection.contains.

Doc from java.util.List.contains.

Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that Objects.equals(o, e).

Parameters
target:Object

element whose presence in this list is to be tested

Returns:boolean

true if this list contains the specified element

Annotations
@Override
delegateCollectionback to summary
pack-priv ImmutableSortedSet<E> delegateCollection()

Overrides com.google.common.collect.RegularImmutableAsList.delegateCollection.

Annotations
@Override
indexOfback to summary
public int indexOf(Object target)

Overrides com.google.common.collect.ImmutableList.indexOf.

Implements java.util.List.indexOf.

Doc from java.util.List.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Parameters
target:Object

element to search for

Returns:int

the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element

Annotations
@GwtIncompatible
@Override
lastIndexOfback to summary
public int lastIndexOf(Object target)

Overrides com.google.common.collect.ImmutableList.lastIndexOf.

Implements java.util.List.lastIndexOf.

Doc from java.util.List.lastIndexOf.

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the highest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Parameters
target:Object

element to search for

Returns:int

the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element

Annotations
@GwtIncompatible
@Override
spliteratorback to summary
public Spliterator<E> spliterator()

Overrides com.google.common.collect.ImmutableList.spliterator.

Overrides default java.lang.Iterable.spliterator, java.util.List.spliterator, java.util.Collection.spliterator.

Doc from java.lang.Iterable.spliterator.

Creates a Spliterator over the elements described by this Iterable.

Returns:Spliterator<E>

a Spliterator over the elements described by this Iterable.

Annotations
@Override
subListUncheckedback to summary
pack-priv ImmutableList<E> subListUnchecked(int fromIndex, int toIndex)

Overrides com.google.common.collect.ImmutableList.subListUnchecked.

Doc from com.google.common.collect.ImmutableList.subListUnchecked.

Called by the default implementation of subList when toIndex - fromIndex > 1, after index validation has already been performed.

Annotations
@GwtIncompatible
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.RegularImmutableAsList.writeReplace.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible