java.lang.Object
io.lettuce.core.internal.LettuceSets
public final class LettuceSets extends Object
Static utility methods for
Set instances. This class is part of the internal API and may change without further
notice.- Since:
- 4.2
- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description static <T> Set<T>newHashSet(Iterable<? extends T> elements)Creates a newHashSetcontaining all elements fromelements.static <T> Set<T>newHashSet(Collection<? extends T> elements)Creates a newHashSetcontaining all elements fromelements.static <T> Set<T>newHashSet(T... elements)Creates a newHashSetcontaining all elements fromelements.static <T> Set<T>unmodifiableSet(T... elements)Creates a new unmodifiableHashSetcontaining all elements fromelements.
-
Method Details
-
newHashSet
Creates a newHashSetcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the set should contain, must not benull.- Returns:
- a new
HashSetcontaining all elements fromelements.
-
newHashSet
Creates a newHashSetcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the set should contain, must not benull.- Returns:
- a new
HashSetcontaining all elements fromelements.
-
newHashSet
Creates a newHashSetcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the set should contain, must not benull.- Returns:
- a new
HashSetcontaining all elements fromelements.
-
unmodifiableSet
Creates a new unmodifiableHashSetcontaining all elements fromelements.- Type Parameters:
T- the element type- Parameters:
elements- the elements that the set should contain, must not benull.- Returns:
- a new
HashSetcontaining all elements fromelements.
-