Class HashSetFactory

java.lang.Object
com.ibm.wala.util.collections.HashSetFactory

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

    • DEBUG

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

    • HashSetFactory

      public HashSetFactory()
  • Method Details

    • 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