Package com.google.common.collect
Class RegularImmutableAsList<E>
java.lang.Object
java.util.AbstractCollection<E>
com.google.common.collect.ImmutableCollection<E>
com.google.common.collect.ImmutableList<E>
com.google.common.collect.ImmutableAsList<E>
com.google.common.collect.RegularImmutableAsList<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,List<E>,RandomAccess,SequencedCollection<E>
- Direct Known Subclasses:
ImmutableSortedAsList
An
ImmutableAsList implementation specialized for when the delegate collection is already
backed by an ImmutableList or array.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableAsList
ImmutableAsList.SerializedFormNested classes/interfaces inherited from class com.google.common.collect.ImmutableList
ImmutableList.Builder<E>, ImmutableList.SubList -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ImmutableCollection<E> private final ImmutableList<? extends E> Fields inherited from class com.google.common.collect.ImmutableCollection
SPLITERATOR_CHARACTERISTICS -
Constructor Summary
ConstructorsConstructorDescriptionRegularImmutableAsList(ImmutableCollection<E> delegate, ImmutableList<? extends E> delegateList) RegularImmutableAsList(ImmutableCollection<E> delegate, Object[] array) -
Method Summary
Modifier and TypeMethodDescription(package private) intcopyIntoArray(Object[] dst, int offset) Copies the contents of this immutable collection into the specified array at the specified offset.(package private) ImmutableCollection<E> (package private) ImmutableList<? extends E> voidget(int index) (package private) Object[]If this collection is backed by an array of its elements in insertion order, returns it.(package private) intIf this collection is backed by an array of its elements in insertion order, returns the offset where this collection's elements end.(package private) intIf this collection is backed by an array of its elements in insertion order, returns the offset where this collection's elements start.listIterator(int index) (package private) ObjectMethods inherited from class com.google.common.collect.ImmutableAsList
contains, isEmpty, isPartialView, sizeMethods inherited from class com.google.common.collect.ImmutableList
add, addAll, asImmutableList, asImmutableList, asList, builder, builderWithExpectedSize, copyOf, copyOf, copyOf, copyOf, equals, 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, spliterator, subList, subListUnchecked, toImmutableListMethods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, remove, removeAll, removeIf, retainAll, toArray, toArrayMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Field Details
-
delegate
-
delegateList
-
-
Constructor Details
-
RegularImmutableAsList
RegularImmutableAsList(ImmutableCollection<E> delegate, ImmutableList<? extends E> delegateList) -
RegularImmutableAsList
RegularImmutableAsList(ImmutableCollection<E> delegate, Object[] array)
-
-
Method Details
-
delegateCollection
ImmutableCollection<E> delegateCollection()- Specified by:
delegateCollectionin classImmutableAsList<E>
-
delegateList
ImmutableList<? extends E> delegateList() -
listIterator
- Specified by:
listIteratorin interfaceList<E>- Overrides:
listIteratorin classImmutableList<E>
-
forEach
-
copyIntoArray
Description copied from class:ImmutableCollectionCopies the contents of this immutable collection into the specified array at the specified offset. Returnsoffset + size().- Overrides:
copyIntoArrayin classImmutableList<E>
-
internalArray
Description copied from class:ImmutableCollectionIf this collection is backed by an array of its elements in insertion order, returns it.- Overrides:
internalArrayin classImmutableCollection<E>
-
internalArrayStart
int internalArrayStart()Description copied from class:ImmutableCollectionIf this collection is backed by an array of its elements in insertion order, returns the offset where this collection's elements start.- Overrides:
internalArrayStartin classImmutableCollection<E>
-
internalArrayEnd
int internalArrayEnd()Description copied from class:ImmutableCollectionIf this collection is backed by an array of its elements in insertion order, returns the offset where this collection's elements end.- Overrides:
internalArrayEndin classImmutableCollection<E>
-
get
-
writeReplace
Object writeReplace()- Overrides:
writeReplacein classImmutableAsList<E>
-