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(int initialCapacity)
Deprecated.
use instead the same name method with elements
Note: will be removed in next minor release |
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(int initialCapacity)
Deprecated.
use instead the same name method with elements
Note: will be removed in next minor release |
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(int initialCapacity)
Deprecated.
use instead the same name method with elements
Note: will be removed in next minor release |
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(T... elements)
|
@SafeVarargs public static final <T> Set<T> newHashSet(T... elements)
@SafeVarargs public static final <T> Set<T> newHashSet(Collection<T> collection, T... elements)
@Deprecated public static final <T> Set<T> newHashSet(int initialCapacity)
T - the generic type of the elementsinitialCapacity - the initial capacityHashSet@SafeVarargs public static final <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@Deprecated public static final <T> Set<T> newLinkedHashSet(int initialCapacity)
LinkedHashSet and will be returned as SetT - the generic type of the elementsinitialCapacity - the initial capacityLinkedHashSet@SafeVarargs public static final <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 final <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@Deprecated public static final <T> Set<T> newInsertionOrderSet(int initialCapacity)
InsertionOrderSet and will be returned as SetT - the generic type of the elementsinitialCapacity - the initial capacityInsertionOrderSet@SafeVarargs public static final <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 final <T> SortedSet<T> newTreeSet(T... elements)
@SafeVarargs public static final <T> SortedSet<T> newTreeSet(Collection<T> collection, T... elements)
@SafeVarargs public static final <T> SortedSet<T> newTreeSet(Collection<T> collection, Comparator<T> comparator, T... elements)
Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.