Most operations are non-destructive, i.e. no input sets are modified during execution. The exception is operations ending in "Into." These accept the target collection of the final calculation as the first parameter.
Some effort is made to return a SortedSet if any input set is sorted, but
this is not guaranteed (e.g., this will not be the case for collections proxied by
Hibernate). When in doubt, specify the target collection explicitly with the "Into"
version.
This class should be used to create instances of MutableSet, ImmutableSet and FixedSizeSet
Mutable 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");
| Modifier and Type | Field and Description |
|---|---|
| public static final FixedSizeSetFactory | |
| private static final Predicate | |
| public static final ImmutableSetFactory | |
| private static final Predicate | |
| public static final MultiReaderSetFactory | |
| public static final MutableSetFactory |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> MutableSet | |
| private static <E, R extends Set | |
| public static <A, B> LazyIterable | |
| public static <A, B, C> LazyIterable | |
| public static <E> MutableSet | |
| public static <E> MutableSet | |
| public static <E, R extends Set | |
| public static <E, R extends Set | |
| private static <E> Comparator | |
| private static <E, R extends Set | |
| public static <E> MutableSet | |
| public static <E> MutableSet | |
| public static <E, R extends Set | |
| public static <E, R extends Set | |
| public static <E> boolean | |
| public static <E> boolean | |
| private static <E> MutableSet | |
| public static <T> MutableSet | |
| private static <E, R extends Set | |
| private static <E, R extends Set | |
| public static <E> MutableSet | |
| public static <E, R extends Set | |
| public static <E> MutableSet | |
| public static <E> MutableSet | |
| public static <E, R extends Set | |
| public static <E, R extends Set |
| fixedSize | back to summary |
|---|---|
| public static final FixedSizeSetFactory fixedSize | |
| HAS_NON_NULL_COMPARATOR | back to summary |
|---|---|
| private static final Predicate<Set<?>> HAS_NON_NULL_COMPARATOR | |
| immutable | back to summary |
|---|---|
| public static final ImmutableSetFactory immutable | |
| INSTANCE_OF_SORTED_SET_PREDICATE | back to summary |
|---|---|
| private static final Predicate<Set<?>> INSTANCE_OF_SORTED_SET_PREDICATE | |
| multiReader | back to summary |
|---|---|
| public static final MultiReaderSetFactory multiReader | |
| mutable | back to summary |
|---|---|
| public static final MutableSetFactory mutable | |
| Sets | back to summary |
|---|---|
| private Sets() | |
| adapt | back to summary |
|---|---|
public static <T> MutableSet
| |
| addAllProcedure | back to summary |
|---|---|
| private static <E, R extends Set | |
| cartesianProduct | back to summary |
|---|---|
| public static <A, B> LazyIterable | |
| cartesianProduct | back to summary |
|---|---|
| public static <A, B, C> LazyIterable | |
| difference | back to summary |
|---|---|
| public static <E> MutableSet | |
| differenceAll | back to summary |
|---|---|
| public static <E> MutableSet | |
| differenceAllInto | back to summary |
|---|---|
| public static <E, R extends Set | |
| differenceInto | back to summary |
|---|---|
| public static <E, R extends Set | |
| extractComparator | back to summary |
|---|---|
| private static <E> Comparator | |
| fillSet | back to summary |
|---|---|
| private static <E, R extends Set | |
| intersect | back to summary |
|---|---|
| public static <E> MutableSet | |
| intersectAll | back to summary |
|---|---|
| public static <E> MutableSet | |
| intersectAllInto | back to summary |
|---|---|
| public static <E, R extends Set | |
| intersectInto | back to summary |
|---|---|
| public static <E, R extends Set | |
| isProperSubsetOf | back to summary |
|---|---|
| public static <E> boolean isProperSubsetOf(Set<? extends E> candidateSubset, Set<? extends E> candidateSuperset) | |
| isSubsetOf | back to summary |
|---|---|
| public static <E> boolean isSubsetOf(Set<? extends E> candidateSubset, Set<? extends E> candidateSuperset) | |
| newSet | back to summary |
|---|---|
| private static <E> MutableSet | |
| powerSet | back to summary |
|---|---|
| public static <T> MutableSet | |
| removeAllProcedure | back to summary |
|---|---|
| private static <E, R extends Set | |
| retainAllProcedure | back to summary |
|---|---|
| private static <E, R extends Set | |
| symmetricDifference | back to summary |
|---|---|
| public static <E> MutableSet | |
| symmetricDifferenceInto | back to summary |
|---|---|
| public static <E, R extends Set | |
| union | back to summary |
|---|---|
| public static <E> MutableSet | |
| unionAll | back to summary |
|---|---|
| public static <E> MutableSet | |
| unionAllInto | back to summary |
|---|---|
| public static <E, R extends Set | |
| unionInto | back to summary |
|---|---|
| public static <E, R extends Set | |