| Modifier and Type | Method and Description |
|---|---|
static <T> Set<T> |
newHashSet(Collection<? extends T> elements)
Creates a new
HashSet containing all elements from elements. |
static <T> Set<T> |
newHashSet(Iterable<? extends T> elements)
Creates a new
HashSet containing all elements from elements. |
static <T> Set<T> |
newHashSet(T... elements)
Creates a new
HashSet containing all elements from elements. |
static <T> Set<T> |
unmodifiableSet(T... elements)
Creates a new unmodifiable
HashSet containing all elements from elements. |
public static <T> Set<T> newHashSet(Collection<? extends T> elements)
HashSet containing all elements from elements.T - the element type.elements - the elements that the set should contain, must not be null.HashSet containing all elements from elements.public static <T> Set<T> newHashSet(Iterable<? extends T> elements)
HashSet containing all elements from elements.T - the element type.elements - the elements that the set should contain, must not be null.HashSet containing all elements from elements.@SafeVarargs public static <T> Set<T> newHashSet(T... elements)
HashSet containing all elements from elements.T - the element type.elements - the elements that the set should contain, must not be null.HashSet containing all elements from elements.@SafeVarargs public static <T> Set<T> unmodifiableSet(T... elements)
HashSet containing all elements from elements.T - the element type.elements - the elements that the set should contain, must not be null.HashSet containing all elements from elements.Copyright © 2020 lettuce.io. All rights reserved.