abstract class ImmutableAsList<E> extends ImmutableList<E>
ImmutableCollection.asList() that delegates contains checks to the
backing collection.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
ImmutableAsList.SerializedForm
Serialized form that leads to the same performance as the original list.
|
ImmutableList.Builder<E>, ImmutableList.SubListSPLITERATOR_CHARACTERISTICS| Constructor and Description |
|---|
ImmutableAsList() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object target) |
(package private) abstract ImmutableCollection<E> |
delegateCollection() |
boolean |
isEmpty() |
(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. |
private void |
readObject(java.io.ObjectInputStream stream) |
int |
size() |
(package private) java.lang.Object |
writeReplace() |
add, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, copyIntoArray, copyOf, copyOf, copyOf, copyOf, equals, forEach, hashCode, indexOf, iterator, lastIndexOf, listIterator, 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, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitabstract ImmutableCollection<E> delegateCollection()
public boolean contains(@CheckForNull
java.lang.Object target)
contains in interface java.util.Collection<E>contains in interface java.util.List<E>contains in class ImmutableList<E>public int size()
public boolean isEmpty()
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>private void readObject(java.io.ObjectInputStream stream)
throws java.io.InvalidObjectException
java.io.InvalidObjectExceptionjava.lang.Object writeReplace()
writeReplace in class ImmutableList<E>