public interface Sets
| Modifier and Type | Method and Description |
|---|---|
static <T> LinkedHashSet<T> |
newInsertionOrderedSet()
Build a new Set with LinkedHashSet implementation, order insertion is
preserved.
|
static <T> TreeSet<T> |
newOrderedSet()
Build a new Set with TreeSet implementation, order is following the
natural objects order.
|
static <T> HashSet<T> |
newSet()
Build a new Set with HashSet implementation, order insertion is not
garanteed, use newOrderSet or newInsersionOrderedSet for that case.
|
static <T> HashSet<T> |
newSet(Collection<T> values) |
static <T> HashSet<T> |
newSet(T... values)
Build a new Set with HashSet implementation from an existing array of
objects.
|
static <T> LinkedHashSet<T> newInsertionOrderedSet()
T - Contained objects type.static <T> TreeSet<T> newOrderedSet()
T - Contained objects type.static <T> HashSet<T> newSet()
T - Contained objects type.@SafeVarargs static <T> HashSet<T> newSet(T... values)
T - Contained objects type.values - Objects to store in the created Set, null values are not allowed.static <T> HashSet<T> newSet(Collection<T> values)
Copyright © 2017. All rights reserved.