@GwtCompatible(emulated=true) class RegularImmutableAsList<E> extends ImmutableAsList<E>
ImmutableAsList
implementation specialized for when the delegate collection is
already backed by an ImmutableList
or array.ImmutableAsList.SerializedForm
ImmutableList.Builder<E>, ImmutableList.SubList
ImmutableCollection.ArrayBasedBuilder<E>
Modifier and Type | Field and Description |
---|---|
private ImmutableCollection<E> |
delegate |
private ImmutableList<? extends E> |
delegateList |
Constructor and Description |
---|
RegularImmutableAsList(ImmutableCollection<E> delegate,
ImmutableList<? extends E> delegateList) |
RegularImmutableAsList(ImmutableCollection<E> delegate,
java.lang.Object[] array) |
Modifier and Type | Method and Description |
---|---|
(package private) int |
copyIntoArray(java.lang.Object[] dst,
int offset)
Copies the contents of this immutable collection into the specified array at the specified
offset.
|
(package private) ImmutableCollection<E> |
delegateCollection() |
(package private) ImmutableList<? extends E> |
delegateList() |
E |
get(int index) |
UnmodifiableListIterator<E> |
listIterator(int index) |
contains, isEmpty, isPartialView, size, writeReplace
add, addAll, asImmutableList, asImmutableList, asList, builder, copyOf, copyOf, copyOf, copyOf, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, reverse, set, subList, subListUnchecked
add, addAll, clear, createAsList, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
private final ImmutableCollection<E> delegate
private final ImmutableList<? extends E> delegateList
RegularImmutableAsList(ImmutableCollection<E> delegate, ImmutableList<? extends E> delegateList)
RegularImmutableAsList(ImmutableCollection<E> delegate, java.lang.Object[] array)
ImmutableCollection<E> delegateCollection()
delegateCollection
in class ImmutableAsList<E>
ImmutableList<? extends E> delegateList()
public UnmodifiableListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
listIterator
in class ImmutableList<E>
@GwtIncompatible(value="not present in emulated superclass") int copyIntoArray(java.lang.Object[] dst, int offset)
ImmutableCollection
offset + size()
.copyIntoArray
in class ImmutableList<E>
public E get(int index)