Package com.google.common.collect
Class ImmutableSortedAsList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.ImmutableCollection<E>
-
- com.google.common.collect.ImmutableList<E>
-
- com.google.common.collect.ImmutableAsList<E>
-
- com.google.common.collect.RegularImmutableAsList<E>
-
- com.google.common.collect.ImmutableSortedAsList<E>
-
- All Implemented Interfaces:
SortedIterable<E>,java.io.Serializable,java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,java.util.RandomAccess
final class ImmutableSortedAsList<E> extends RegularImmutableAsList<E> implements SortedIterable<E>
List returned byImmutableSortedSet.asList()when the set isn't empty.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableAsList
ImmutableAsList.SerializedForm
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableList
ImmutableList.Builder<E>, ImmutableList.SubList
-
-
Field Summary
-
Fields inherited from class com.google.common.collect.ImmutableCollection
SPLITERATOR_CHARACTERISTICS
-
-
Constructor Summary
Constructors Constructor Description ImmutableSortedAsList(ImmutableSortedSet<E> backingSet, ImmutableList<E> backingList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Comparator<? super E>comparator()Returns theComparatorby which the elements of this iterable are ordered, orOrdering.natural()if the elements are ordered by their natural ordering.booleancontains(java.lang.Object target)(package private) ImmutableSortedSet<E>delegateCollection()intindexOf(java.lang.Object target)intlastIndexOf(java.lang.Object target)java.util.Spliterator<E>spliterator()(package private) ImmutableList<E>subListUnchecked(int fromIndex, int toIndex)Called by the default implementation ofImmutableList.subList(int, int)whentoIndex - fromIndex > 1, after index validation has already been performed.-
Methods inherited from class com.google.common.collect.RegularImmutableAsList
copyIntoArray, delegateList, forEach, get, internalArray, internalArrayEnd, internalArrayStart, listIterator
-
Methods inherited from class com.google.common.collect.ImmutableAsList
isEmpty, isPartialView, size, writeReplace
-
Methods inherited from class com.google.common.collect.ImmutableList
add, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, copyOf, copyOf, copyOf, copyOf, equals, hashCode, iterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, replaceAll, reverse, set, sort, sortedCopyOf, sortedCopyOf, subList, toImmutableList
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, remove, removeAll, removeIf, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.List
add, addAll, clear, containsAll, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from interface com.google.common.collect.SortedIterable
iterator
-
-
-
-
Constructor Detail
-
ImmutableSortedAsList
ImmutableSortedAsList(ImmutableSortedSet<E> backingSet, ImmutableList<E> backingList)
-
-
Method Detail
-
delegateCollection
ImmutableSortedSet<E> delegateCollection()
- Overrides:
delegateCollectionin classRegularImmutableAsList<E>
-
comparator
public java.util.Comparator<? super E> comparator()
Description copied from interface:SortedIterableReturns theComparatorby which the elements of this iterable are ordered, orOrdering.natural()if the elements are ordered by their natural ordering.- Specified by:
comparatorin interfaceSortedIterable<E>
-
indexOf
public int indexOf(java.lang.Object target)
- Specified by:
indexOfin interfacejava.util.List<E>- Overrides:
indexOfin classImmutableList<E>
-
lastIndexOf
public int lastIndexOf(java.lang.Object target)
- Specified by:
lastIndexOfin interfacejava.util.List<E>- Overrides:
lastIndexOfin classImmutableList<E>
-
contains
public boolean contains(java.lang.Object target)
- Specified by:
containsin interfacejava.util.Collection<E>- Specified by:
containsin interfacejava.util.List<E>- Overrides:
containsin classImmutableAsList<E>
-
subListUnchecked
ImmutableList<E> subListUnchecked(int fromIndex, int toIndex)
Description copied from class:ImmutableListCalled by the default implementation ofImmutableList.subList(int, int)whentoIndex - fromIndex > 1, after index validation has already been performed.- Overrides:
subListUncheckedin classImmutableList<E>
-
spliterator
public java.util.Spliterator<E> spliterator()
- Specified by:
spliteratorin interfacejava.util.Collection<E>- Specified by:
spliteratorin interfacejava.lang.Iterable<E>- Specified by:
spliteratorin interfacejava.util.List<E>- Overrides:
spliteratorin classImmutableList<E>
-
-