public class SeenHashSet<E> extends java.util.HashSet<E> implements SeenSet<E>
NOTE: Okay to use hash table since nothing changes based on the order. We never need to iterate over the contents.
Constructor and Description |
---|
SeenHashSet() |
SeenHashSet(java.util.Collection<? extends E> c) |
SeenHashSet(int initialCapacity) |
SeenHashSet(int initialCapacity,
float loadFactor) |
Modifier and Type | Method and Description |
---|---|
boolean |
see(E element,
boolean recursive)
Manage a "seen" set for avoiding infinite recursion.
|
add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator
addAll, containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
public SeenHashSet()
public SeenHashSet(java.util.Collection<? extends E> c)
c
- public SeenHashSet(int initialCapacity)
initialCapacity
- public SeenHashSet(int initialCapacity, float loadFactor)
initialCapacity
- loadFactor
-