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
Fields Modifier and Type Field Description private static ImmutableSet.EmptySetBuilderImpl<java.lang.Object>
INSTANCE
-
Fields inherited from class com.google.common.collect.ImmutableSet.SetBuilderImpl
dedupedElements, distinct
-
-
Constructor Summary
Constructors Modifier Constructor Description private
EmptySetBuilderImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ImmutableSet.SetBuilderImpl<E>
add(E 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 Detail
-
INSTANCE
private static final ImmutableSet.EmptySetBuilderImpl<java.lang.Object> INSTANCE
-
-
Method Detail
-
instance
static <E> ImmutableSet.SetBuilderImpl<E> instance()
-
add
ImmutableSet.SetBuilderImpl<E> add(E e)
Description copied from class:ImmutableSet.SetBuilderImpl
Adds 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:
add
in classImmutableSet.SetBuilderImpl<E>
-
copy
ImmutableSet.SetBuilderImpl<E> copy()
Description copied from class:ImmutableSet.SetBuilderImpl
Creates 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:
copy
in classImmutableSet.SetBuilderImpl<E>
-
build
ImmutableSet<E> build()
- Specified by:
build
in classImmutableSet.SetBuilderImpl<E>
-
-