Package org.assertj.core.util
Class Sets
java.lang.Object
org.assertj.core.util.Sets
Utility methods related to
Sets.- Author:
- Alex Ruiz
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> HashSet<T> Creates a mutableHashSet.static <T> HashSet<T> newHashSet(Iterable<? extends T> elements) Creates a mutableHashSetcontaining the given elements.static <T> LinkedHashSet<T> Creates a mutableLinkedHashSet.static <T> LinkedHashSet<T> newLinkedHashSet(T... elements) Creates a mutableLinkedHashSetcontaining the given elements.static <T> TreeSet<T> Creates a mutableTreeSet.static <T> TreeSet<T> newTreeSet(T... elements) Creates a mutableTreeSetcontaining the given elements.static <T> Set<T> set(T... elements) Creates a mutableLinkedHashSetcontaining the given elements.
-
Method Details
-
set
Creates a mutableLinkedHashSetcontaining 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.
-
newHashSet
Creates a mutableHashSet.- Type Parameters:
T- the generic type of theHashSetto create.- Returns:
- the created
HashSet.
-
newHashSet
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
Creates a mutableLinkedHashSet.- Type Parameters:
T- the generic type of theLinkedHashSetto create.- Returns:
- the created
LinkedHashSet.
-
newLinkedHashSet
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
Creates a mutableTreeSet. -
newTreeSet
Creates a mutableTreeSetcontaining the given elements.
-