- java.lang.Object
-
- com.aoapps.collections.Sets
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> Set<E>union(Set<? extends E>... sets)Combines multiple sets, maintaining order.static <E> Set<E>union(Set<? extends E> set, E... elements)Combines a set with some new elements, maintaining order.static <E> Set<E>union(Set<? extends E> set1, Set<? extends E> set2)Combines two sets, maintaining order.
-
-
-
Method Detail
-
union
public static <E> Set<E> union(Set<? extends E> set1, Set<? extends E> set2)
Combines two sets, maintaining order.- Parameters:
set1- may benull, which will be treated same as an empty setset2- may benull, which will be treated same as an empty set- See Also:
LinkedHashSet
-
union
@SafeVarargs public static <E> Set<E> union(Set<? extends E>... sets)
Combines multiple sets, maintaining order.- Parameters:
sets- may benull, which will be treated same as an empty array. Elements may benull, which will be treated same as an empty set.- See Also:
LinkedHashSet
-
union
@SafeVarargs public static <E> Set<E> union(Set<? extends E> set, E... elements)
Combines a set with some new elements, maintaining order.- Parameters:
set- may benull, which will be treated same as an empty setelements- may benull, which will be treated same as an empty array- See Also:
LinkedHashSet
-
-