@GwtCompatible(emulated=true) final class ImmutableSortedAsList<E> extends RegularImmutableAsList<E> implements SortedIterable<E>
ImmutableSortedSet.asList()
when the set isn't empty.ImmutableAsList.SerializedForm
ImmutableList.Builder<E>, ImmutableList.SubList
SPLITERATOR_CHARACTERISTICS
Constructor and Description |
---|
ImmutableSortedAsList(ImmutableSortedSet<E> backingSet,
ImmutableList<E> backingList) |
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<? super E> |
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. |
boolean |
contains(java.lang.Object target) |
(package private) ImmutableSortedSet<E> |
delegateCollection() |
int |
indexOf(java.lang.Object target) |
int |
lastIndexOf(java.lang.Object target) |
java.util.Spliterator<E> |
spliterator() |
(package private) ImmutableList<E> |
subListUnchecked(int fromIndex,
int toIndex)
Called by the default implementation of
ImmutableList.subList(int, int) when toIndex - fromIndex > 1 ,
after index validation has already been performed. |
copyIntoArray, delegateList, forEach, get, listIterator
isEmpty, isPartialView, size, writeReplace
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
add, addAll, clear, remove, removeAll, removeIf, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
iterator
ImmutableSortedAsList(ImmutableSortedSet<E> backingSet, ImmutableList<E> backingList)
ImmutableSortedSet<E> delegateCollection()
delegateCollection
in class RegularImmutableAsList<E>
public java.util.Comparator<? super E> comparator()
SortedIterable
Comparator
by which the elements of this iterable are ordered, or Ordering.natural()
if the elements are ordered by their natural ordering.comparator
in interface SortedIterable<E>
@GwtIncompatible public int indexOf(java.lang.Object target)
indexOf
in interface java.util.List<E>
indexOf
in class ImmutableList<E>
@GwtIncompatible public int lastIndexOf(java.lang.Object target)
lastIndexOf
in interface java.util.List<E>
lastIndexOf
in class ImmutableList<E>
public boolean contains(java.lang.Object target)
contains
in interface java.util.Collection<E>
contains
in interface java.util.List<E>
contains
in class ImmutableAsList<E>
@GwtIncompatible ImmutableList<E> subListUnchecked(int fromIndex, int toIndex)
ImmutableList
ImmutableList.subList(int, int)
when toIndex - fromIndex > 1
,
after index validation has already been performed.subListUnchecked
in class ImmutableList<E>
public java.util.Spliterator<E> spliterator()
spliterator
in interface java.lang.Iterable<E>
spliterator
in interface java.util.Collection<E>
spliterator
in interface java.util.List<E>
spliterator
in class ImmutableList<E>