org.jcodings.util
Class Hash<V>

java.lang.Object
  extended by 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
 class Hash.HashEntryIterator
           
 class Hash.HashIterator
           
 
Field Summary
protected  org.jcodings.util.Hash.HashEntry<V> head
           
protected  int size
           
protected  org.jcodings.util.Hash.HashEntry<V>[] table
           
 
Constructor Summary
Hash()
           
Hash(int size)
           
 
Method Summary
protected static int bucketIndex(int h, int length)
           
protected  void checkResize()
           
 Hash.HashEntryIterator entryIterator()
           
protected static int hashValue(int h)
           
protected abstract  void init()
           
 Iterator<V> iterator()
           
protected  void resize(int newCapacity)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected org.jcodings.util.Hash.HashEntry<V>[] table

size

protected int size

head

protected org.jcodings.util.Hash.HashEntry<V> head
Constructor Detail

Hash

public Hash()

Hash

public Hash(int size)
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)

iterator

public Iterator<V> iterator()
Specified by:
iterator in interface Iterable<V>

entryIterator

public Hash.HashEntryIterator entryIterator()


Copyright © 2011. All Rights Reserved.