Class Sets


  • public final class Sets
    extends java.lang.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
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Sets()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <E> java.util.HashSet<E> newHashSet()
      Returns a new mutable, empty HashSet instance.
      static <E extends java.lang.Comparable<?>>
      java.util.TreeSet<E>
      newTreeSet()
      Returns a new mutable, empty TreeSet instance sorted by the natural sort ordering of its elements.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sets

        private Sets()
    • Method Detail

      • newHashSet

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

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