@GwtCompatible(serializable=true, emulated=true) 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.SubList
ImmutableCollection.ArrayBasedBuilder<E>
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, copyIntoArray, copyOf, copyOf, copyOf, copyOf, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, of, of, of, of, of, of, of, of, of, of, of, of, of, remove, reverse, set, subList, subListUnchecked
add, addAll, clear, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
abstract ImmutableCollection<E> delegateCollection()
public boolean contains(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()
ImmutableCollection
true
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>
@GwtIncompatible private void readObject(java.io.ObjectInputStream stream) throws java.io.InvalidObjectException
java.io.InvalidObjectException
@GwtIncompatible java.lang.Object writeReplace()
writeReplace
in class ImmutableList<E>