Class SetUtils
- java.lang.Object
-
- org.sonarsource.analyzer.commons.collections.SetUtils
-
public final class SetUtils extends Object
This class is used for Java < 9 to simplify the creation of maps. After moving to Java > 9, should be replaced by Immutable Set Static Factory Methods- See Also:
- Immutable Set Static Factory Methods
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Set<T>
concat(Set<T>... sets)
static <T> Set<T>
difference(Set<T> set1, Set<T> set2)
static <T> T
getOnlyElement(Set<T> set)
static <T> Set<T>
immutableSetOf(T... elements)
-
-
-
Method Detail
-
immutableSetOf
@SafeVarargs public static <T> Set<T> immutableSetOf(T... elements)
-
concat
@SafeVarargs public static <T> Set<T> concat(Set<T>... sets)
-
getOnlyElement
public static <T> T getOnlyElement(Set<T> set)
-
-