public final class SetFactory extends Object
SetFactory provides factory methods for create new Set objects| Constructor and Description |
|---|
SetFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Set<T> |
newHashSet(Collection<T> collection,
T... elements)
|
static <T> Set<T> |
newHashSet(T... elements)
|
static <T> Set<T> |
newInsertionOrderSet(Collection<T> collection,
T... elements)
Factory method for create new
InsertionOrderSet and will be returned as Set |
static <T> Set<T> |
newInsertionOrderSet(T... elements)
Factory method for create new
InsertionOrderSet and will be returned as Set |
static <T> Set<T> |
newLinkedHashSet(Collection<T> collection,
T... elements)
Factory method for create new
LinkedHashSet and will be returned as Set |
static <T> Set<T> |
newLinkedHashSet(T... elements)
Factory method for create new
LinkedHashSet and will be returned as Set |
static <T> SortedSet<T> |
newTreeSet(Collection<T> collection,
Comparator<T> comparator,
T... elements)
|
static <T> SortedSet<T> |
newTreeSet(Collection<T> collection,
T... elements)
|
static <T> SortedSet<T> |
newTreeSet(@NonNull Comparator<T> comparator,
T... elements)
|
static <T> SortedSet<T> |
newTreeSet(T... elements)
|
static <T> Supplier<SortedSet<T>> |
newTreeSetSupplier(@NonNull Comparator<T> comparator)
|
@SafeVarargs public static <T> Set<T> newHashSet(T... elements)
@SafeVarargs public static <T> Set<T> newHashSet(Collection<T> collection, T... elements)
@SafeVarargs public static <T> Set<T> newLinkedHashSet(T... elements)
LinkedHashSet and will be returned as SetT - the generic type of the elementselements - the elements to add in the new HashSetLinkedHashSet@SafeVarargs public static <T> Set<T> newLinkedHashSet(Collection<T> collection, T... elements)
LinkedHashSet and will be returned as SetT - the generic type of the elementscollection - the optional collection that will be added to the new listelements - the elements to add in the new LinkedHashSetHashSet@SafeVarargs public static <T> Set<T> newInsertionOrderSet(T... elements)
InsertionOrderSet and will be returned as SetT - the generic type of the elementselements - the elements to add in the new InsertionOrderSetInsertionOrderSet@SafeVarargs public static <T> Set<T> newInsertionOrderSet(Collection<T> collection, T... elements)
InsertionOrderSet and will be returned as SetT - the generic type of the elementscollection - the optional collection that will be added to the new listelements - the elements to add in the new InsertionOrderSetInsertionOrderSet@SafeVarargs public static <T> SortedSet<T> newTreeSet(T... elements)
@SafeVarargs public static <T> SortedSet<T> newTreeSet(@NonNull @NonNull Comparator<T> comparator, T... elements)
@SafeVarargs public static <T> SortedSet<T> newTreeSet(Collection<T> collection, T... elements)
@SafeVarargs public static <T> SortedSet<T> newTreeSet(Collection<T> collection, Comparator<T> comparator, T... elements)
public static <T> Supplier<SortedSet<T>> newTreeSetSupplier(@NonNull @NonNull Comparator<T> comparator)
T - the generic type of the elementscomparator - the comparatorSupplierCopyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.