Top Constructors Methods
com.google.common.collect

pack-priv abstract Class IndexedImmutableSet<E>

extends ImmutableSet.CachingAsList<E>
Class Inheritance
Known Direct Subclasses
com.google.common.collect.JdkBackedImmutableSet, com.google.common.collect.RegularImmutableMap.KeySet, com.google.common.collect.RegularImmutableTable.CellSet, com.google.common.collect.ImmutableMapKeySet, com.google.common.collect.ImmutableMultiset.EntrySet
Annotations
@GwtCompatible
emulated:true
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkNotNull

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int
copyIntoArray(@Nullable Object[] dst, int offset)

pack-priv ImmutableList<E>
public void
forEach(Consumer<? super E>
The action to be performed for each element
consumer
)

Overrides default java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.
pack-priv abstract E
get(int index)

public UnmodifiableIterator<E>
iterator()

Implements abstract com.google.common.collect.ImmutableSet.iterator.

Implements java.util.Set.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this set.
public Spliterator<E>
spliterator()

Overrides com.google.common.collect.ImmutableCollection.spliterator.

Overrides default java.util.Set.spliterator, java.util.Collection.spliterator.

Creates a Spliterator over the elements in this set.
pack-priv Object
Inherited from com.google.common.collect.ImmutableSet.CachingAsList:
asList

Constructor Detail

IndexedImmutableSetback to summary
pack-priv IndexedImmutableSet()

Method Detail

copyIntoArrayback to summary
pack-priv int copyIntoArray(@Nullable Object[] dst, int offset)
Annotations
@Override
@GwtIncompatible
createAsListback to summary
pack-priv ImmutableList<E> createAsList()

Overrides com.google.common.collect.ImmutableSet.CachingAsList.createAsList.

Annotations
@Override
forEachback to summary
public void forEach(Consumer<? super E> consumer)

Overrides default java.lang.Iterable.forEach.

Doc from java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy.

Parameters
consumer:Consumer<? super E>

The action to be performed for each element

Annotations
@Override
getback to summary
pack-priv abstract E get(int index)
iteratorback to summary
public UnmodifiableIterator<E> iterator()

Implements abstract com.google.common.collect.ImmutableSet.iterator.

Implements java.util.Set.iterator, java.util.Collection.iterator.

Doc from java.util.Set.iterator.

Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Returns:UnmodifiableIterator<E>

an iterator over the elements in this set

Annotations
@Override
spliteratorback to summary
public Spliterator<E> spliterator()

Overrides com.google.common.collect.ImmutableCollection.spliterator.

Overrides default java.util.Set.spliterator, java.util.Collection.spliterator.

Doc from java.util.Set.spliterator.

Creates a Spliterator over the elements in this set.

The Spliterator reports Spliterator#DISTINCT. Implementations should document the reporting of additional characteristic values.

Returns:Spliterator<E>

a Spliterator over the elements in this set

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

Overrides com.google.common.collect.ImmutableSet.CachingAsList.writeReplace.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible