Package com.google.common.collect
Class ImmutableSet.EmptySetBuilderImpl<E>
java.lang.Object
com.google.common.collect.ImmutableSet.SetBuilderImpl<E>
com.google.common.collect.ImmutableSet.EmptySetBuilderImpl<E>
- Enclosing class:
- ImmutableSet<E>
private static final class ImmutableSet.EmptySetBuilderImpl<E>
extends ImmutableSet.SetBuilderImpl<E>
-
Field Summary
FieldsFields inherited from class com.google.common.collect.ImmutableSet.SetBuilderImpl
dedupedElements, distinct -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ImmutableSet.SetBuilderImpl<E>Adds e to this SetBuilderImpl, returning the updated result.(package private) ImmutableSet<E>build()(package private) ImmutableSet.SetBuilderImpl<E>copy()Creates a new copy of this SetBuilderImpl.(package private) static <E> ImmutableSet.SetBuilderImpl<E>instance()Methods inherited from class com.google.common.collect.ImmutableSet.SetBuilderImpl
addDedupedElement, combine, review
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
EmptySetBuilderImpl
private EmptySetBuilderImpl()
-
-
Method Details
-
instance
-
add
Description copied from class:ImmutableSet.SetBuilderImplAdds e to this SetBuilderImpl, returning the updated result. Only use the returned SetBuilderImpl, since we may switch implementations if e.g. hash flooding is detected.- Specified by:
addin classImmutableSet.SetBuilderImpl<E>
-
copy
ImmutableSet.SetBuilderImpl<E> copy()Description copied from class:ImmutableSet.SetBuilderImplCreates a new copy of this SetBuilderImpl. Modifications to that SetBuilderImpl will not affect this SetBuilderImpl or sets constructed from this SetBuilderImpl via build().- Specified by:
copyin classImmutableSet.SetBuilderImpl<E>
-
build
ImmutableSet<E> build()- Specified by:
buildin classImmutableSet.SetBuilderImpl<E>
-