Class 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 Detail

      • immutableSetOf

        @SafeVarargs
        public static <T> Set<T> immutableSetOf​(T... elements)
      • difference

        public static <T> Set<T> difference​(Set<T> set1,
                                            Set<T> set2)
      • getOnlyElement

        public static <T> T getOnlyElement​(Set<T> set)