Top Description Inners Constructors Methods
com.google.common.collect

pack-priv abstract Class ImmutableAsList<E>

extends ImmutableList<E>
Class Inheritance
Known Direct Subclasses
com.google.common.collect.RegularImmutableAsList
Annotations
@GwtCompatible
serializable:true
emulated:true
@SuppressWarnings:serial
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, .GwtIncompatible, .J2ktIncompatible, java.io.InvalidObjectException, .ObjectInputStream, .Serializable, javax.annotation.CheckForNull

List returned by ImmutableCollection#asList that delegates contains checks to the backing collection.
Authors
Jared Levy, Louis Wasserman

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
ImmutableAsList.SerializedForm

Serialized form that leads to the same performance as the original list.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Object
element whose presence in this list is to be tested
target
)

Overrides com.google.common.collect.ImmutableList.contains.

Implements java.util.List.contains, java.util.Collection.contains.

Returns true if this list contains the specified element.
pack-priv abstract ImmutableCollection<E>
public boolean
isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements java.util.List.isEmpty, java.util.Collection.isEmpty.

Returns true if this list contains no elements.
pack-priv boolean
isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.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
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
pack-priv Object
Inherited from com.google.common.collect.ImmutableList:
addaddAllasImmutableListasImmutableListasListbuilderbuilderWithExpectedSizecopyIntoArraycopyOfcopyOfcopyOfcopyOfequalsforEachhashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorofofofofofofofofofofofofofremovereplaceAllreversesetsortsortedCopyOfsortedCopyOfspliteratorsubListsubListUncheckedtoImmutableList

Constructor Detail

ImmutableAsListback to summary
pack-priv ImmutableAsList()

Method Detail

containsback to summary
public boolean contains(Object target)

Overrides com.google.common.collect.ImmutableList.contains.

Implements java.util.List.contains, java.util.Collection.contains.

Doc from java.util.List.contains.

Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that Objects.equals(o, e).

Parameters
target:Object

element whose presence in this list is to be tested

Returns:boolean

true if this list contains the specified element

Annotations
@Override
delegateCollectionback to summary
pack-priv abstract ImmutableCollection<E> delegateCollection()
isEmptyback to summary
public boolean isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements java.util.List.isEmpty, java.util.Collection.isEmpty.

Doc from java.util.List.isEmpty.

Returns true if this list contains no elements.

Returns:boolean

true if this list contains no elements

Annotations
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns 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.

Annotations
@Override
readObjectback to summary
private void readObject(ObjectInputStream stream) throws InvalidObjectException

Hides com.google.common.collect.ImmutableList.readObject.

Annotations
@GwtIncompatible
@J2ktIncompatible
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.ImmutableList.writeReplace.

Annotations
@GwtIncompatible
@J2ktIncompatible
@Override
com.google.common.collect back to summary

pack-priv Class ImmutableAsList.SerializedForm

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@GwtIncompatible
@J2ktIncompatible

Serialized form that leads to the same performance as the original list.

Field Summary

Modifier and TypeField and Description
pack-priv final ImmutableCollection<?>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

collectionback to summary
pack-priv final ImmutableCollection<?> collection
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

SerializedFormback to summary
pack-priv SerializedForm(ImmutableCollection<?> collection)

Method Detail

readResolveback to summary
pack-priv Object readResolve()