public class HashTable
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected int |
currEntry |
protected int[] |
hashTable |
protected static int |
minHashSize
Deprecated.
Don't depend on this implementation detail. @noreference This field is not intended to be referenced by clients.
|
protected int[] |
nextTable |
Constructor and Description |
---|
HashTable(int initialSize) |
Modifier and Type | Method and Description |
---|---|
int |
capacity() |
void |
clear() |
java.lang.Object |
clone() |
int |
countCollisions()
Returns the number of collisions.
|
void |
dumpNexts()
For debugging only.
|
protected int |
hash(int pos) |
boolean |
isEmpty() |
protected void |
linkIntoHashTable(int i,
int hash) |
protected int |
partition(java.util.Comparator<java.lang.Object> c,
int p,
int r) |
protected void |
rehash() |
protected void |
removeEntry(int i,
int hash) |
protected void |
resize() |
protected void |
resize(int size) |
int |
size() |
void |
sort(java.util.Comparator<java.lang.Object> c) |
@Deprecated protected static final int minHashSize
protected int currEntry
protected int[] hashTable
protected int[] nextTable
public boolean isEmpty()
public final int size()
public java.lang.Object clone()
clone
in class java.lang.Object
protected void resize()
public void clear()
protected void rehash()
protected void resize(int size)
protected int hash(int pos)
protected final void linkIntoHashTable(int i, int hash)
public final int capacity()
protected void removeEntry(int i, int hash)
public final void sort(java.util.Comparator<java.lang.Object> c)
protected int partition(java.util.Comparator<java.lang.Object> c, int p, int r)
public void dumpNexts()
public int countCollisions()