com.ibm.wala.util.collections
Class HashSetFactory

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

public class HashSetFactory
extends java.lang.Object

A debugging aid. When HashSetFactory.DEBUG is set, this class creates ParanoidHashSets. Otherwise, it returns java.util.HashSets


Field Summary
static boolean DEBUG
          If true, this factory returns Paranoid versions of collections
 
Constructor Summary
HashSetFactory()
           
 
Method Summary
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.Set<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)
Parameters:
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.Set<T> s)
Parameters:
s -
Returns:
A ParanoidHashSet if DEBUG = true, a java.util.HashSet otherwise