Class Sets
- java.lang.Object
-
- org.eclipse.collections.api.factory.Sets
-
public final class Sets extends java.lang.Object
This class should be used to create instances of MutableSet, ImmutableSet and FixedSizeSetMutable Examples:
MutableSet<String> emptySet = Sets.mutable.empty(); MutableSet<String> setWith = Sets.mutable.with("a", "b", "c"); MutableSet<String> setOf = Sets.mutable.of("a", "b", "c");
Immutable Examples:ImmutableSet<String> emptySet = Sets.immutable.empty(); ImmutableSet<String> setWith = Sets.immutable.with("a", "b", "c"); ImmutableSet<String> setOf = Sets.immutable.of("a", "b", "c");
FixedSize Examples:FixedSizeSet<String> emptySet = Sets.fixedSize.empty(); FixedSizeSet<String> setWith = Sets.fixedSize.with("a", "b", "c"); FixedSizeSet<String> setOf = Sets.fixedSize.of("a", "b", "c");
MultiReader Examples:MultiReaderSet<String> emptySet = Sets.multiReader.empty(); MultiReaderSet<String> setWith = Sets.multiReader.with("a", "b", "c"); MultiReaderSet<String> setOf = Sets.multiReader.of("a", "b", "c");
-
-
Field Summary
Fields Modifier and Type Field Description static FixedSizeSetFactory
fixedSize
static ImmutableSetFactory
immutable
static MultiReaderSetFactory
multiReader
static MutableSetFactory
mutable
-
Constructor Summary
Constructors Modifier Constructor Description private
Sets()
-
-
-
Field Detail
-
immutable
public static final ImmutableSetFactory immutable
-
mutable
public static final MutableSetFactory mutable
-
fixedSize
public static final FixedSizeSetFactory fixedSize
-
multiReader
public static final MultiReaderSetFactory multiReader
-
-