org.drools.reteoo
Class LeftTuple

java.lang.Object
  extended by org.drools.reteoo.LeftTuple
All Implemented Interfaces:
Serializable, Entry, Tuple

public class LeftTuple
extends Object
implements Tuple, Entry

See Also:
Serialized Form

Field Summary
 LeftTuple firstChild
           
 LeftTuple lastChild
           
 
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)
           
 
Method Summary
 void decreaseActivationCountForEvents()
           
 boolean equals(LeftTuple other)
          We use this equals method to avoid the cast
 boolean equals(Object object)
           
 InternalFactHandle get(Declaration declaration)
          Returns the FactHandle for the given Declaration, which in turn specifcy the Pattern that they depend on.
 InternalFactHandle get(int index)
          Returns the FactHandle for the given pattern index.
 LeftTuple getBlockedNext()
           
 LeftTuple getBlockedPrevious()
           
 RightTuple getBlocker()
           
 InternalFactHandle[] getFactHandles()
          Returns the fact handles in reverse order
 int getIndex()
           
 InternalFactHandle getLastHandle()
           
 LeftTuple getLeftParent()
           
 LeftTuple getLeftParentNext()
           
 LeftTuple getLeftParentPrevious()
           
 LeftTupleSink getLeftTupleSink()
           
 LeftTupleList getMemory()
           
 Entry getNext()
           
 Object getObject()
           
 LeftTuple getParent()
           
 Entry getPrevious()
           
 RightTuple getRightParent()
           
 LeftTuple getRightParentNext()
           
 LeftTuple getRightParentPrevious()
           
 LeftTuple getSubTuple(int elements)
          Returns the ReteTuple that contains the "elements" first elements in this tuple.
 int hashCode()
           
 void increaseActivationCountForEvents()
           
 void reAdd()
           
 void reAddLeft()
           
 void reAddRight()
           
 void setBlockedNext(LeftTuple blockerNext)
           
 void setBlockedPrevious(LeftTuple blockerPrevious)
           
 void setBlocker(RightTuple blocker)
           
 void setLeftParent(LeftTuple leftParent)
           
 void setLeftParentNext(LeftTuple leftParentright)
           
 void setLeftParentPrevious(LeftTuple leftParentLeft)
           
 void setLeftTupleSink(LeftTupleSink sink)
           
 void setMemory(LeftTupleList memory)
           
 void setNext(Entry next)
           
 void setObject(Object object)
           
 void setPrevious(Entry previous)
           
 void setRightParent(RightTuple rightParent)
           
 void setRightParentNext(LeftTuple rightParentRight)
           
 void setRightParentPrevious(LeftTuple rightParentLeft)
           
 int size()
          Returns the size of this tuple in number of elements (patterns)
 InternalFactHandle[] toFactHandles()
           
 Object[] toObjectArray()
           
 String toString()
           
 String toTupleTree(int indent)
           
 void unlinkFromLeftParent()
           
 void unlinkFromRightParent()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

firstChild

public LeftTuple firstChild

lastChild

public LeftTuple lastChild
Constructor Detail

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)
Method Detail

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.