Class Sets

java.lang.Object
org.jboss.weld.util.collections.Sets

public final class Sets extends Object
Static utility methods for Set.
Author:
Martin Kouba
  • Method Details

    • newHashSet

      @SafeVarargs public static <E> HashSet<E> newHashSet(E... elements)
      Parameters:
      elements -
      Returns:
    • union

      public static <E> Set<E> union(Set<? extends E> set1, Set<? extends E> set2)
      This is a replacement for Guava's Sets#union(Set, Set).
      Parameters:
      set1 -
      set2 -
      Returns:
      an unmodifiable view of the union of two sets