Class HashSetFactory


  • public class HashSetFactory
    extends Object
    A debugging aid. When HashSetFactory.DEBUG is set, this class creates ParanoidHashSets. Otherwise, it returns LinkedHashSets
    • Field Detail

      • DEBUG

        public static final boolean DEBUG
        If true, this factory returns Paranoid versions of collections
        See Also:
        Constant Field Values
    • Constructor Detail

      • HashSetFactory

        public HashSetFactory()
    • Method Detail

      • make

        public static <T> HashSet<T> make​(int size)
        Returns:
        A ParanoidHashSet if DEBUG = true, a java.util.HashSet otherwise
      • make

        public static <T> HashSet<T> make()
        Returns:
        A ParanoidHashSet if DEBUG = true, a java.util.HashSet otherwise
      • make

        public static <T> HashSet<T> make​(Collection<T> s)
        Returns:
        A ParanoidHashSet if DEBUG = true, a java.util.HashSet otherwise