com.ibm.wala.util.collections
Class ParanoidHashSet<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<T>
              extended by com.ibm.wala.util.collections.ParanoidHashSet<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>

public class ParanoidHashSet<T>
extends java.util.HashSet<T>

a debugging aid. This implementation complains if you stick an object in here which appears to use System.identityHashCode(), or if it detects more than BAD_HC collisions in the Set (possibly indicated a bad hash function)

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
ParanoidHashSet()
           
ParanoidHashSet(int size)
           
ParanoidHashSet(java.util.Set<T> s)
           
 
Method Summary
 boolean add(T arg0)
           
 
Methods inherited from class java.util.HashSet
clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ParanoidHashSet

public ParanoidHashSet(java.util.Set<T> s)
                throws java.lang.NullPointerException
Parameters:
s -
Throws:
java.lang.NullPointerException - if s is null

ParanoidHashSet

public ParanoidHashSet()

ParanoidHashSet

public ParanoidHashSet(int size)
Parameters:
size -
Method Detail

add

public boolean add(T arg0)
Specified by:
add in interface java.util.Collection<T>
Specified by:
add in interface java.util.Set<T>
Overrides:
add in class java.util.HashSet<T>