public class Sets extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> HashSet<T> |
newHashSet(int expectedSize)
Returns a HashSet with a capacity that is sufficient to keep the
underlying map from being resized as long as it grows no larger than
expectedSize with the default load factor (0.75).
|
static <T> HashSet<T> |
newHashSet(T... elements)
Returns a HashSet containing the given elements with a capacity that is
sufficient to keep the underlying map from being resized for the given
elements with the default load factor (0.75).
|
static <T> Set<T> |
newImmutableSet(Collection<T> original) |
public static <T> HashSet<T> newHashSet(int expectedSize)
@SafeVarargs public static <T> HashSet<T> newHashSet(T... elements)
public static <T> Set<T> newImmutableSet(Collection<T> original)
Copyright © 2013–2019 mklinger GmbH. All rights reserved.