Package com.ibm.wala.util.collections
Class ParanoidHashSet<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<E>
-
- java.util.HashSet<E>
-
- java.util.LinkedHashSet<T>
-
- com.ibm.wala.util.collections.ParanoidHashSet<T>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,Set<T>
public class ParanoidHashSet<T> extends LinkedHashSet<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
Fields Modifier and Type Field Description static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ParanoidHashSet()
ParanoidHashSet(int size)
ParanoidHashSet(Collection<T> s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(T arg0)
-
Methods inherited from class java.util.LinkedHashSet
spliterator
-
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.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ParanoidHashSet
public ParanoidHashSet(Collection<T> s) throws NullPointerException
- Parameters:
s
-- Throws:
NullPointerException
- if s is null
-
ParanoidHashSet
public ParanoidHashSet()
-
ParanoidHashSet
public ParanoidHashSet(int size)
-
-
Method Detail
-
add
public boolean add(T arg0)
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceSet<T>
- Overrides:
add
in classHashSet<T>
- Throws:
UnimplementedError
- if there's a bad hash code problem- See Also:
Collection.add(java.lang.Object)
-
-