Class Sets


  • public final class Sets
    extends Object
    Static utility methods pertaining to Set instances.

    NOTE: this is a copy of a subset of Guava's Sets. The implementation must match as closely as possible to Guava's implementation.

    Since:
    1.14
    Author:
    Yaniv Inbar
    • Method Detail

      • newHashSet

        public static <E> HashSet<E> newHashSet()
        Returns a new mutable, empty HashSet instance.
      • newTreeSet

        public static <E extends Comparable<?>> TreeSet<E> newTreeSet()
        Returns a new mutable, empty TreeSet instance sorted by the natural sort ordering of its elements.