- java.lang.Object
-
- org.jcodings.util.Hash<V>
-
- All Implemented Interfaces:
Iterable<V>
- Direct Known Subclasses:
BytesHash,CaseInsensitiveBytesHash,IntArrayHash,IntHash,ObjHash
public abstract class Hash<V> extends Object implements Iterable<V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHash.HashEntry<V>classHash.HashEntryIteratorclassHash.HashIterator
-
Field Summary
Fields Modifier and Type Field Description protected Hash.HashEntry<V>headprotected intsizeprotected Hash.HashEntry<V>[]table
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static intbucketIndex(int h, int length)protected voidcheckResize()Hash.HashEntryIteratorentryIterator()protected static inthashValue(int h)protected abstract voidinit()Iterator<V>iterator()protected voidresize(int newCapacity)intsize()-
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 Detail
-
table
protected Hash.HashEntry<V>[] table
-
size
protected int size
-
head
protected Hash.HashEntry<V> head
-
-
Method Detail
-
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)
-
entryIterator
public Hash.HashEntryIterator entryIterator()
-
-