Class HashSetFactory


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

      Fields 
      Modifier and Type Field Description
      static boolean DEBUG
      If true, this factory returns Paranoid versions of collections
    • Constructor Summary

      Constructors 
      Constructor Description
      HashSetFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.HashSet<T> make()  
      static <T> java.util.HashSet<T> make​(int size)  
      static <T> java.util.HashSet<T> make​(java.util.Collection<T> s)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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> java.util.HashSet<T> make​(int size)
        Returns:
        A ParanoidHashSet if DEBUG = true, a java.util.HashSet otherwise
      • make

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

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