public final class Sets
extends java.lang.Object
Sets.| Modifier | Constructor and Description |
|---|---|
private |
Sets() |
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.HashSet<T> |
newHashSet()
Creates a mutable
HashSet. |
static <T> java.util.HashSet<T> |
newHashSet(java.lang.Iterable<? extends T> elements)
Creates a mutable
HashSet containing the given elements. |
static <T> java.util.LinkedHashSet<T> |
newLinkedHashSet()
Creates a mutable
LinkedHashSet. |
static <T> java.util.LinkedHashSet<T> |
newLinkedHashSet(T... elements)
Creates a mutable
LinkedHashSet containing the given elements. |
static <T> java.util.TreeSet<T> |
newTreeSet()
Creates a mutable
TreeSet. |
static <T> java.util.TreeSet<T> |
newTreeSet(T... elements)
Creates a mutable
TreeSet containing the given elements. |
public static <T> java.util.HashSet<T> newHashSet()
HashSet.T - the generic type of the HashSet to create.HashSet.public static <T> java.util.HashSet<T> newHashSet(java.lang.Iterable<? extends T> elements)
HashSet containing the given elements.T - the generic type of the HashSet to create.elements - the elements to store in the HashSet.HashSet, or null if the given array of elements is null.public static <T> java.util.LinkedHashSet<T> newLinkedHashSet()
LinkedHashSet.T - the generic type of the LinkedHashSet to create.LinkedHashSet.@SafeVarargs public static <T> java.util.LinkedHashSet<T> newLinkedHashSet(T... elements)
LinkedHashSet containing the given elements.T - the generic type of the LinkedHashSet to create.elements - the elements to store in the LinkedHashSet.LinkedHashSet, or null if the given array of elements is null.public static <T> java.util.TreeSet<T> newTreeSet()
TreeSet.T - the generic type of the TreeSet to create.TreeSet.@SafeVarargs public static <T> java.util.TreeSet<T> newTreeSet(T... elements)
TreeSet containing the given elements.T - the generic type of the TreeSet to create.elements - the elements to store in the TreeSet.TreeSet, or null if the given array of elements is null.