class RegularImmutableList<E> extends ImmutableList<E>
ImmutableList backed by a simple array.ImmutableList.Builder<E>, ImmutableList.SerializedForm, ImmutableList.SubList| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.Object[] |
array |
(package private) static ImmutableList<java.lang.Object> |
EMPTY |
SPLITERATOR_CHARACTERISTICS| 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) 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.
|
(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() |
java.util.Spliterator<E> |
spliterator() |
add, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, contains, copyOf, copyOf, copyOf, copyOf, equals, forEach, 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, subList, subListUnchecked, toImmutableList, writeReplaceadd, addAll, clear, remove, removeAll, removeIf, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitstatic final ImmutableList<java.lang.Object> EMPTY
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>java.lang.Object[] internalArray()
ImmutableCollectioninternalArray in class ImmutableCollection<E>int internalArrayStart()
ImmutableCollectioninternalArrayStart in class ImmutableCollection<E>int internalArrayEnd()
ImmutableCollectioninternalArrayEnd 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>public java.util.Spliterator<E> spliterator()
spliterator in interface java.lang.Iterable<E>spliterator in interface java.util.Collection<E>spliterator in interface java.util.List<E>spliterator in class ImmutableList<E>