@GwtCompatible(serializable=true, emulated=true) class RegularImmutableList<E> extends ImmutableList<E>
ImmutableList used for 0 or 2+ elements (not 1).ImmutableList.Builder<E>, ImmutableList.SerializedForm, ImmutableList.SubListImmutableCollection.ArrayBasedBuilder<E>| Modifier and Type | Field and Description |
|---|---|
private java.lang.Object[] |
array |
(package private) static ImmutableList<java.lang.Object> |
EMPTY |
| Constructor and Description |
|---|
RegularImmutableList(java.lang.Object[] array) |
| 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) |
(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. |
UnmodifiableListIterator<E> |
listIterator(int index) |
int |
size() |
add, addAll, asImmutableList, asImmutableList, asList, builder, contains, 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, writeReplaceadd, addAll, clear, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitstatic final ImmutableList<java.lang.Object> EMPTY
private final transient 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 UnmodifiableListIterator<E> listIterator(int index)
listIterator in interface java.util.List<E>listIterator in class ImmutableList<E>