org.drools.core.util
Class RightTupleIndexHashTable
java.lang.Object
org.drools.core.util.AbstractHashTable
org.drools.core.util.RightTupleIndexHashTable
- All Implemented Interfaces:
- Externalizable, Serializable, RightTupleMemory
public class RightTupleIndexHashTable
- extends AbstractHashTable
- implements RightTupleMemory
- See Also:
- Serialized Form
Field Summary |
static int |
PRIME
|
PRIME
public static final int PRIME
- See Also:
- Constant Field Values
RightTupleIndexHashTable
public RightTupleIndexHashTable()
RightTupleIndexHashTable
public RightTupleIndexHashTable(AbstractHashTable.FieldIndex[] index)
RightTupleIndexHashTable
public RightTupleIndexHashTable(int capacity,
float loadFactor,
AbstractHashTable.FieldIndex[] index)
readExternal
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
- Specified by:
readExternal
in interface Externalizable
- Overrides:
readExternal
in class AbstractHashTable
- Throws:
IOException
ClassNotFoundException
writeExternal
public void writeExternal(ObjectOutput out)
throws IOException
- Specified by:
writeExternal
in interface Externalizable
- Overrides:
writeExternal
in class AbstractHashTable
- Throws:
IOException
init
public void init(Entry[] table,
int size,
int factSize)
getFirst
public RightTuple getFirst(LeftTuple leftTuple,
InternalFactHandle factHandle)
- Description copied from interface:
RightTupleMemory
- The FactHandle is always the context fact and is necessary when the object being modified is in the both left and right
node memories. This is because the memory on the opposite side would not have yet memory.removeAdd the fact, so it
could potentially be in the wrong bucket. So the bucket matches check always checks to ignore the first facthandle if it's
the same as the context fact.
- Specified by:
getFirst
in interface RightTupleMemory
- Returns:
getFirst
public RightTuple getFirst(RightTuple rightTuple)
getLast
public RightTuple getLast(LeftTuple leftTuple)
isIndexed
public boolean isIndexed()
- Specified by:
isIndexed
in interface RightTupleMemory
getIndex
public AbstractHashTable.Index getIndex()
getBucket
public Entry getBucket(Object object)
- Specified by:
getBucket
in class AbstractHashTable
iterator
public Iterator iterator()
- Specified by:
iterator
in interface RightTupleMemory
- Overrides:
iterator
in class AbstractHashTable
getResizeHashcode
public int getResizeHashcode(Entry entry)
- Specified by:
getResizeHashcode
in class AbstractHashTable
fastIterator
public FastIterator fastIterator()
- Specified by:
fastIterator
in interface RightTupleMemory
fullFastIterator
public FastIterator fullFastIterator()
- Specified by:
fullFastIterator
in interface RightTupleMemory
fullFastIterator
public FastIterator fullFastIterator(RightTuple rightTuple)
- Specified by:
fullFastIterator
in interface RightTupleMemory
toArray
public Entry[] toArray()
- Specified by:
toArray
in interface RightTupleMemory
- Overrides:
toArray
in class AbstractHashTable
add
public void add(RightTuple rightTuple)
- Specified by:
add
in interface RightTupleMemory
removeAdd
public void removeAdd(RightTuple rightTuple)
- Specified by:
removeAdd
in interface RightTupleMemory
remove
public void remove(RightTuple rightTuple)
- We assume that this rightTuple is contained in this hash table
- Specified by:
remove
in interface RightTupleMemory
contains
public boolean contains(RightTuple rightTuple)
- Specified by:
contains
in interface RightTupleMemory
get
public RightTupleList get(LeftTuple tuple,
InternalFactHandle factHandle)
size
public int size()
- Specified by:
size
in interface RightTupleMemory
- Overrides:
size
in class AbstractHashTable
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.