Package org.jcodings.util
Class Hash<V>
java.lang.Object
org.jcodings.util.Hash<V>
- All Implemented Interfaces:
Iterable<V>
- Direct Known Subclasses:
BytesHash
,CaseInsensitiveBytesHash
,IntArrayHash
,IntHash
,ObjHash
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
class
class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
protected Hash.HashEntry
<V> private static final int
private static final int
private static final int
private static final int[]
protected int
protected Hash.HashEntry<V>[]
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
table
-
size
protected int size -
PRIMES
private static final int[] PRIMES -
INITIAL_CAPACITY
private static final int INITIAL_CAPACITY -
MAXIMUM_CAPACITY
private static final int MAXIMUM_CAPACITY- See Also:
-
head
-
MIN_CAPA
private static final int MIN_CAPA- See Also:
-
HASH_SIGN_BIT_MASK
private static final int HASH_SIGN_BIT_MASK- See Also:
-
-
Constructor Details
-
Hash
public Hash() -
Hash
public Hash(int size)
-
-
Method Details
-
init
protected abstract void init() -
size
public final int size() -
checkResize
protected final void checkResize() -
resize
protected final void resize(int newCapacity) -
bucketIndex
protected static int bucketIndex(int h, int length) -
hashValue
protected static int hashValue(int h) -
iterator
-
entryIterator
-