Package org.drools.core.util
Class AbstractHashTable
java.lang.Object
org.drools.core.util.AbstractHashTable
- All Implemented Interfaces:
Externalizable,Serializable
- Direct Known Subclasses:
TupleIndexHashTable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interfacestatic interfacestatic classstatic classstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractHashTable(float loadFactor, TupleList[] table) AbstractHashTable(int capacity, float loadFactor) AbstractHashTable(TupleList[] table) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidensureCapacity(int itemsToBeAdded) abstract intgetResizeHashcode(TupleList entry) getTable()protected static intindexOf(int hashCode, int dataSize) booleanisEmpty()iterator()voidprotected voidresize(int newCapacity) intsize()toString()void
-
Field Details
-
PRIME
public static final int PRIME- See Also:
-
size
protected int size -
threshold
protected int threshold -
loadFactor
protected float loadFactor -
table
-
-
Constructor Details
-
AbstractHashTable
public AbstractHashTable() -
AbstractHashTable
public AbstractHashTable(int capacity, float loadFactor) -
AbstractHashTable
-
AbstractHashTable
-
-
Method Details
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
iterator
-
newIterator
-
ensureCapacity
public void ensureCapacity(int itemsToBeAdded) -
resize
protected void resize(int newCapacity) -
getResizeHashcode
-
getTable
-
size
public int size() -
isEmpty
public boolean isEmpty() -
indexOf
protected static int indexOf(int hashCode, int dataSize) -
toString
-
clear
public void clear()
-