org.drools.core.util
Class AbstractHashTable
java.lang.Object
org.drools.core.util.AbstractHashTable
- All Implemented Interfaces:
- Externalizable, Serializable
- Direct Known Subclasses:
- LeftTupleIndexHashTable, ObjectHashMap, ObjectHashSet, RightTupleIndexHashTable, TripleStore
public abstract class AbstractHashTable
- extends Object
- implements Externalizable
- See Also:
- Serialized Form
size
protected int size
threshold
protected int threshold
loadFactor
protected float loadFactor
comparator
protected AbstractHashTable.ObjectComparator comparator
table
protected Entry[] table
AbstractHashTable
public AbstractHashTable()
AbstractHashTable
public AbstractHashTable(int capacity,
float loadFactor)
AbstractHashTable
public AbstractHashTable(Entry[] table)
AbstractHashTable
public AbstractHashTable(float loadFactor,
Entry[] table)
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal in interface Externalizable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal in interface Externalizable
- Throws:
IOException
iterator
public Iterator iterator()
newIterator
public Iterator newIterator()
setComparator
public void setComparator(AbstractHashTable.ObjectComparator comparator)
resize
protected void resize(int newCapacity)
getResizeHashcode
public abstract int getResizeHashcode(Entry entry)
toArray
public Entry[] toArray()
getBucket
protected Entry getBucket(int hashCode)
getTable
public Entry[] getTable()
size
public int size()
isEmpty
public boolean isEmpty()
rehash
public static int rehash(int hash)
indexOf
protected static int indexOf(int hashCode,
int dataSize)
getBucket
public abstract Entry getBucket(Object object)
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.