Modifier and Type | Method and Description |
---|---|
static <T> HashSet<T> |
newHashSet()
Creates a mutable
HashSet . |
static <T> HashSet<T> |
newHashSet(Iterable<? extends T> elements)
Creates a mutable
HashSet containing the given elements. |
static <T> LinkedHashSet<T> |
newLinkedHashSet()
Creates a mutable
LinkedHashSet . |
static <T> LinkedHashSet<T> |
newLinkedHashSet(T... elements)
Creates a mutable
LinkedHashSet containing the given elements. |
static <T> TreeSet<T> |
newTreeSet()
Creates a mutable
TreeSet . |
static <T> TreeSet<T> |
newTreeSet(T... elements)
Creates a mutable
TreeSet containing the given elements. |
public static <T> HashSet<T> newHashSet()
HashSet
.T
- the generic type of the HashSet
to create.HashSet
.public static <T> HashSet<T> newHashSet(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> LinkedHashSet<T> newLinkedHashSet()
LinkedHashSet
.T
- the generic type of the LinkedHashSet
to create.LinkedHashSet
.@SafeVarargs public static <T> 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
.@SafeVarargs public static <T> TreeSet<T> newTreeSet(T... elements)
TreeSet
containing the given elements.Copyright © 2013–2018 AssertJ. All rights reserved.