org.drools.reteoo
Class LeftTuple
java.lang.Object
org.drools.reteoo.LeftTuple
- All Implemented Interfaces:
- Serializable, Entry, Tuple
public class LeftTuple
- extends Object
- implements Tuple, Entry
- See Also:
- Serialized Form
|
Constructor Summary |
LeftTuple()
|
LeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple(LeftTuple leftTuple,
InternalFactHandle handle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
firstChild
public LeftTuple firstChild
lastChild
public LeftTuple lastChild
LeftTuple
public LeftTuple()
LeftTuple
public LeftTuple(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTuple
public LeftTuple(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTuple
public LeftTuple(LeftTuple leftTuple,
InternalFactHandle handle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTuple
public LeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTuple
public LeftTuple(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
reAdd
public void reAdd()
reAddLeft
public void reAddLeft()
reAddRight
public void reAddRight()
unlinkFromLeftParent
public void unlinkFromLeftParent()
unlinkFromRightParent
public void unlinkFromRightParent()
getIndex
public int getIndex()
getLeftTupleSink
public LeftTupleSink getLeftTupleSink()
setLeftTupleSink
public void setLeftTupleSink(LeftTupleSink sink)
getLeftParent
public LeftTuple getLeftParent()
setLeftParent
public void setLeftParent(LeftTuple leftParent)
getLeftParentPrevious
public LeftTuple getLeftParentPrevious()
setLeftParentPrevious
public void setLeftParentPrevious(LeftTuple leftParentLeft)
getLeftParentNext
public LeftTuple getLeftParentNext()
setLeftParentNext
public void setLeftParentNext(LeftTuple leftParentright)
getRightParent
public RightTuple getRightParent()
setRightParent
public void setRightParent(RightTuple rightParent)
getRightParentPrevious
public LeftTuple getRightParentPrevious()
setRightParentPrevious
public void setRightParentPrevious(LeftTuple rightParentLeft)
getRightParentNext
public LeftTuple getRightParentNext()
setRightParentNext
public void setRightParentNext(LeftTuple rightParentRight)
get
public InternalFactHandle get(int index)
- Description copied from interface:
Tuple
- Returns the
FactHandle for the given pattern index. If the pattern is empty
It returns null.
- Specified by:
get in interface Tuple
- Parameters:
index - The index of the pattern from which the FactHandleImpl is to be returned
- Returns:
- The
FactHandle
getMemory
public LeftTupleList getMemory()
setMemory
public void setMemory(LeftTupleList memory)
getPrevious
public Entry getPrevious()
setPrevious
public void setPrevious(Entry previous)
setNext
public void setNext(Entry next)
- Specified by:
setNext in interface Entry
getNext
public Entry getNext()
- Specified by:
getNext in interface Entry
getLastHandle
public InternalFactHandle getLastHandle()
get
public InternalFactHandle get(Declaration declaration)
- Description copied from interface:
Tuple
- Returns the
FactHandle for the given Declaration, which in turn
specifcy the Pattern that they depend on.
- Specified by:
get in interface Tuple
- Parameters:
declaration - The Declaration which specifies the Pattern
- Returns:
- The
FactHandle
getFactHandles
public InternalFactHandle[] getFactHandles()
- Returns the fact handles in reverse order
- Specified by:
getFactHandles in interface Tuple
toFactHandles
public InternalFactHandle[] toFactHandles()
setBlocker
public void setBlocker(RightTuple blocker)
getBlocker
public RightTuple getBlocker()
getBlockedPrevious
public LeftTuple getBlockedPrevious()
setBlockedPrevious
public void setBlockedPrevious(LeftTuple blockerPrevious)
getBlockedNext
public LeftTuple getBlockedNext()
setBlockedNext
public void setBlockedNext(LeftTuple blockerNext)
getObject
public Object getObject()
setObject
public void setObject(Object object)
toString
public String toString()
- Overrides:
toString in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(LeftTuple other)
- We use this equals method to avoid the cast
- Parameters:
tuple -
- Returns:
equals
public boolean equals(Object object)
- Overrides:
equals in class Object
size
public int size()
- Description copied from interface:
Tuple
- Returns the size of this tuple in number of elements (patterns)
- Specified by:
size in interface Tuple
- Returns:
getSubTuple
public LeftTuple getSubTuple(int elements)
- Returns the ReteTuple that contains the "elements"
first elements in this tuple.
Use carefully as no cloning is made during this process.
This method is used by TupleStartEqualsConstraint when
joining a subnetwork tuple into the main network tuple;
- Parameters:
elements - the number of elements to return, starting from
the begining of the tuple
- Returns:
- a ReteTuple containing the "elements" first elements
of this tuple or null if "elements" is greater than size;
toObjectArray
public Object[] toObjectArray()
getParent
public LeftTuple getParent()
toTupleTree
public String toTupleTree(int indent)
increaseActivationCountForEvents
public void increaseActivationCountForEvents()
decreaseActivationCountForEvents
public void decreaseActivationCountForEvents()
Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.