@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
ImmutableCollection.ArrayBasedBuilder<E>
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) |
(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, get, listIterator
isEmpty, isPartialView, size, writeReplace
add, addAll, asImmutableList, asImmutableList, asList, builder, copyOf, copyOf, copyOf, copyOf, equals, hashCode, iterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, reverse, set, subList
add, addAll, clear, remove, removeAll, 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(@Nullable java.lang.Object target)
indexOf
in interface java.util.List<E>
indexOf
in class ImmutableList<E>
@GwtIncompatible public int lastIndexOf(@Nullable 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>