org.drools.core.util
Class AbstractHashTable

java.lang.Object
  extended by org.drools.core.util.AbstractHashTable
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
LeftTupleIndexHashTable, ObjectHashMap, ObjectHashSet, Placeholders, RightTupleIndexHashTable

public abstract class AbstractHashTable
extends Object
implements Externalizable

See Also:
Serialized Form

Nested Class Summary
static class AbstractHashTable.DoubleCompositeIndex
           
static class AbstractHashTable.EqualityEquals
           
static class AbstractHashTable.FieldIndex
           
static class AbstractHashTable.HashTableIterator
          Fast re-usable iterator
static interface AbstractHashTable.Index
           
static class AbstractHashTable.InstanceEquals
           
static interface AbstractHashTable.ObjectComparator
           
static class AbstractHashTable.SingleIndex
           
static class AbstractHashTable.TripleCompositeIndex
           
 
Field Summary
protected  AbstractHashTable.ObjectComparator comparator
           
protected  float loadFactor
           
protected  int size
           
protected  Entry[] table
           
protected  int threshold
           
 
Constructor Summary
AbstractHashTable()
           
AbstractHashTable(Entry[] table)
           
AbstractHashTable(float loadFactor, Entry[] table)
           
AbstractHashTable(int capacity, float loadFactor)
           
 
Method Summary
protected  Entry getBucket(int hashCode)
           
abstract  Entry getBucket(Object object)
           
 Entry[] getTable()
           
protected  int indexOf(int hashCode, int dataSize)
           
 boolean isEmpty()
           
 Iterator iterator()
           
 Iterator newIterator()
           
 void readExternal(ObjectInput in)
           
protected  void resize(int newCapacity)
           
 void setComparator(AbstractHashTable.ObjectComparator comparator)
           
 int size()
           
 Entry[] toArray()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size

threshold

protected int threshold

loadFactor

protected float loadFactor

comparator

protected AbstractHashTable.ObjectComparator comparator

table

protected Entry[] table
Constructor Detail

AbstractHashTable

public AbstractHashTable()

AbstractHashTable

public AbstractHashTable(int capacity,
                         float loadFactor)

AbstractHashTable

public AbstractHashTable(Entry[] table)

AbstractHashTable

public AbstractHashTable(float loadFactor,
                         Entry[] table)
Method Detail

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)

toArray

public Entry[] toArray()

getBucket

protected Entry getBucket(int hashCode)

getTable

public Entry[] getTable()

size

public int size()

isEmpty

public boolean isEmpty()

indexOf

protected int indexOf(int hashCode,
                      int dataSize)

getBucket

public abstract Entry getBucket(Object object)


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.