public class IdentityOpenHashSet<E>
extends java.util.AbstractSet<E>
Modifier and Type | Class and Description |
---|---|
private static class |
IdentityOpenHashSet.Iter<E> |
Modifier and Type | Field and Description |
---|---|
private E[] |
buffer |
private int |
resizeThreshold |
private int |
size |
Constructor and Description |
---|
IdentityOpenHashSet(int capacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E newVal) |
private void |
addForResize(E[] buffer,
int mask,
E newVal) |
private boolean |
addSlowPath(E[] buffer,
int mask,
E newVal,
int hash) |
private void |
compactAndRemove(E[] buffer,
int mask,
int removeHashIndex) |
boolean |
contains(java.lang.Object needle) |
private boolean |
containsSlowPath(E[] buffer,
int mask,
int hash,
java.lang.Object needle) |
java.util.Iterator<E> |
iterator() |
boolean |
remove(java.lang.Object val) |
private boolean |
removeSlowPath(java.lang.Object val,
E[] buffer,
int mask,
int hash) |
private void |
resize() |
int |
size() |
addAll, clear, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
private int size
private E[] buffer
private int resizeThreshold
public int size()
public boolean add(E newVal)
private void resize()
public boolean remove(java.lang.Object val)
private boolean removeSlowPath(java.lang.Object val, E[] buffer, int mask, int hash)
private void compactAndRemove(E[] buffer, int mask, int removeHashIndex)
public boolean contains(java.lang.Object needle)
private boolean containsSlowPath(E[] buffer, int mask, int hash, java.lang.Object needle)