Package com.google.common.collect
Class IndexedImmutableSet<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.ImmutableCollection<E>
-
- com.google.common.collect.ImmutableSet<E>
-
- com.google.common.collect.IndexedImmutableSet<E>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.Set<E>
- Direct Known Subclasses:
ImmutableMapKeySet
,ImmutableMultiset.EntrySet
,JdkBackedImmutableSet
,RegularImmutableMap.KeySet
,RegularImmutableTable.CellSet
@GwtCompatible(emulated=true) abstract class IndexedImmutableSet<E> extends ImmutableSet<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableSet
ImmutableSet.Builder<E>, ImmutableSet.Indexed<E>
-
-
Field Summary
-
Fields inherited from class com.google.common.collect.ImmutableSet
HASH_FLOODING_FPP, MAX_RUN_MULTIPLIER, MAX_TABLE_SIZE, SPLITERATOR_CHARACTERISTICS
-
-
Constructor Summary
Constructors Constructor Description IndexedImmutableSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) int
copyIntoArray(java.lang.Object[] dst, int offset)
Copies the contents of this immutable collection into the specified array at the specified offset.(package private) ImmutableList<E>
createAsList()
void
forEach(java.util.function.Consumer<? super E> consumer)
(package private) abstract E
get(int index)
UnmodifiableIterator<E>
iterator()
Returns an unmodifiable iterator across the elements in this collection.java.util.Spliterator<E>
spliterator()
-
Methods inherited from class com.google.common.collect.ImmutableSet
asList, builder, builderWithExpectedSize, chooseTableSize, copyOf, copyOf, copyOf, copyOf, equals, hashCode, hashFloodingDetected, isHashCodeFast, of, of, of, of, of, of, of, rebuildHashTable, toImmutableSet, writeReplace
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, contains, internalArray, internalArrayEnd, internalArrayStart, isPartialView, remove, removeAll, removeIf, retainAll, toArray, toArray
-
-
-
-
Method Detail
-
get
abstract E get(int index)
-
iterator
public UnmodifiableIterator<E> iterator()
Description copied from class:ImmutableCollection
Returns an unmodifiable iterator across the elements in this collection.
-
spliterator
public java.util.Spliterator<E> spliterator()
- Specified by:
spliterator
in interfacejava.util.Collection<E>
- Specified by:
spliterator
in interfacejava.lang.Iterable<E>
- Specified by:
spliterator
in interfacejava.util.Set<E>
- Overrides:
spliterator
in classImmutableCollection<E>
-
forEach
public void forEach(java.util.function.Consumer<? super E> consumer)
-
copyIntoArray
@GwtIncompatible int copyIntoArray(java.lang.Object[] dst, int offset)
Description copied from class:ImmutableCollection
Copies the contents of this immutable collection into the specified array at the specified offset. Returnsoffset + size()
.- Overrides:
copyIntoArray
in classImmutableCollection<E>
-
createAsList
ImmutableList<E> createAsList()
- Overrides:
createAsList
in classImmutableSet<E>
-
-