Package org.assertj.core.util
Class Sets
- java.lang.Object
-
- org.assertj.core.util.Sets
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSets()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> HashSet<T>newHashSet()Creates a mutableHashSet.static <T> HashSet<T>newHashSet(Iterable<? extends T> elements)Creates a mutableHashSetcontaining the given elements.static <T> LinkedHashSet<T>newLinkedHashSet()Creates a mutableLinkedHashSet.static <T> LinkedHashSet<T>newLinkedHashSet(T... elements)Creates a mutableLinkedHashSetcontaining the given elements.static <T> TreeSet<T>newTreeSet()Creates a mutableTreeSet.static <T> TreeSet<T>newTreeSet(T... elements)Creates a mutableTreeSetcontaining the given elements.
-
-
-
Method Detail
-
newHashSet
public static <T> HashSet<T> newHashSet()
Creates a mutableHashSet.- Type Parameters:
T- the generic type of theHashSetto create.- Returns:
- the created
HashSet.
-
newHashSet
public static <T> HashSet<T> newHashSet(Iterable<? extends T> elements)
Creates a mutableHashSetcontaining the given elements.- Type Parameters:
T- the generic type of theHashSetto create.- Parameters:
elements- the elements to store in theHashSet.- Returns:
- the created
HashSet, ornullif the given array of elements isnull.
-
newLinkedHashSet
public static <T> LinkedHashSet<T> newLinkedHashSet()
Creates a mutableLinkedHashSet.- Type Parameters:
T- the generic type of theLinkedHashSetto create.- Returns:
- the created
LinkedHashSet.
-
newLinkedHashSet
@SafeVarargs public static <T> LinkedHashSet<T> newLinkedHashSet(T... elements)
Creates a mutableLinkedHashSetcontaining the given elements.- Type Parameters:
T- the generic type of theLinkedHashSetto create.- Parameters:
elements- the elements to store in theLinkedHashSet.- Returns:
- the created
LinkedHashSet, ornullif the given array of elements isnull.
-
newTreeSet
@SafeVarargs public static <T> TreeSet<T> newTreeSet(T... elements)
Creates a mutableTreeSetcontaining the given elements.
-
-