public abstract class Hash<V>
extends java.lang.Object
implements java.lang.Iterable<V>
| Modifier and Type | Class and Description |
|---|---|
static class |
Hash.HashEntry<V> |
class |
Hash.HashEntryIterator |
class |
Hash.HashIterator |
| Modifier and Type | Field and Description |
|---|---|
private static int |
HASH_SIGN_BIT_MASK |
protected Hash.HashEntry<V> |
head |
private static int |
INITIAL_CAPACITY |
private static int |
MAXIMUM_CAPACITY |
private static int |
MIN_CAPA |
private static int[] |
PRIMES |
protected int |
size |
protected Hash.HashEntry<V>[] |
table |
| Modifier and Type | Method and Description |
|---|---|
protected static int |
bucketIndex(int h,
int length) |
protected void |
checkResize() |
Hash.HashEntryIterator |
entryIterator() |
protected static int |
hashValue(int h) |
protected abstract void |
init() |
java.util.Iterator<V> |
iterator() |
protected void |
resize(int newCapacity) |
int |
size() |
protected Hash.HashEntry<V>[] table
protected int size
private static final int[] PRIMES
private static final int INITIAL_CAPACITY
private static final int MAXIMUM_CAPACITY
protected Hash.HashEntry<V> head
private static final int MIN_CAPA
private static final int HASH_SIGN_BIT_MASK
protected abstract void init()
public final int size()
protected final void checkResize()
protected final void resize(int newCapacity)
protected static int bucketIndex(int h,
int length)
protected static int hashValue(int h)
public java.util.Iterator<V> iterator()
iterator in interface java.lang.Iterable<V>public Hash.HashEntryIterator entryIterator()