@GwtCompatible(serializable=true, emulated=true) class RegularImmutableList<E> extends ImmutableList<E>
ImmutableList with one or more elements.ImmutableList.Builder<E>, ImmutableList.SerializedForm, ImmutableList.SubListImmutableCollection.ArrayBasedBuilder<E>| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object[] |
array |
private int |
offset |
private int |
size |
| Constructor and Description |
|---|
RegularImmutableList(java.lang.Object[] array) |
RegularImmutableList(java.lang.Object[] array,
int offset,
int size) |
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
copyIntoArray(java.lang.Object[] dst,
int dstOff)
Copies the contents of this immutable collection into the specified array at the specified
offset.
|
E |
get(int index) |
int |
indexOf(java.lang.Object object) |
(package private) boolean |
isPartialView()
Returns
true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. |
int |
lastIndexOf(java.lang.Object object) |
UnmodifiableListIterator<E> |
listIterator(int index) |
int |
size() |
(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. |
add, addAll, asImmutableList, asImmutableList, asList, builder, contains, 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, writeReplaceadd, addAll, clear, createAsList, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitprivate final transient int offset
private final transient int size
private final transient java.lang.Object[] array
RegularImmutableList(java.lang.Object[] array,
int offset,
int size)
RegularImmutableList(java.lang.Object[] array)
public int size()
boolean isPartialView()
ImmutableCollectiontrue if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. This is generally
used to determine whether copyOf implementations should make an explicit copy to avoid
memory leaks.isPartialView in class ImmutableCollection<E>int copyIntoArray(java.lang.Object[] dst,
int dstOff)
ImmutableCollectionoffset + size().copyIntoArray in class ImmutableList<E>public E get(int index)
public int indexOf(@Nullable
java.lang.Object object)
indexOf in interface java.util.List<E>indexOf in class ImmutableList<E>public int lastIndexOf(@Nullable
java.lang.Object object)
lastIndexOf in interface java.util.List<E>lastIndexOf in class ImmutableList<E>ImmutableList<E> subListUnchecked(int fromIndex, int toIndex)
ImmutableListImmutableList.subList(int, int) when toIndex - fromIndex > 1, after index validation has already been
performed.subListUnchecked in class ImmutableList<E>public UnmodifiableListIterator<E> listIterator(int index)
listIterator in interface java.util.List<E>listIterator in class ImmutableList<E>