class RegularImmutableAsList<E> extends ImmutableAsList<E>
ImmutableAsList implementation specialized for when the delegate collection is already
backed by an ImmutableList or array.ImmutableAsList.SerializedFormImmutableList.Builder<E>, ImmutableList.SubList| Modifier and Type | Field and Description |
|---|---|
private ImmutableCollection<E> |
delegate |
private ImmutableList<? extends E> |
delegateList |
SPLITERATOR_CHARACTERISTICS| 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() |
void |
forEach(java.util.function.Consumer<? super E> action) |
E |
get(int index) |
(package private) java.lang.Object[] |
internalArray()
If this collection is backed by an array of its elements in insertion order, returns it.
|
(package private) int |
internalArrayEnd()
If this collection is backed by an array of its elements in insertion order, returns the offset
where this collection's elements end.
|
(package private) int |
internalArrayStart()
If this collection is backed by an array of its elements in insertion order, returns the offset
where this collection's elements start.
|
UnmodifiableListIterator<E> |
listIterator(int index) |
contains, isEmpty, isPartialView, size, writeReplaceadd, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, copyOf, copyOf, copyOf, copyOf, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, replaceAll, reverse, set, sort, sortedCopyOf, sortedCopyOf, spliterator, subList, subListUnchecked, toImmutableListadd, addAll, clear, remove, removeAll, removeIf, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitprivate 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>public void forEach(java.util.function.Consumer<? super E> action)
forEach in interface java.lang.Iterable<E>forEach in class ImmutableList<E>int copyIntoArray(java.lang.Object[] dst,
int offset)
ImmutableCollectionoffset + size().copyIntoArray in class ImmutableList<E>@CheckForNull java.lang.Object[] internalArray()
ImmutableCollectioninternalArray in class ImmutableCollection<E>int internalArrayStart()
ImmutableCollectioninternalArrayStart in class ImmutableCollection<E>int internalArrayEnd()
ImmutableCollectioninternalArrayEnd in class ImmutableCollection<E>public E get(int index)