org.drools.reteoo
Class LeftTupleImpl
java.lang.Object
org.drools.reteoo.LeftTupleImpl
- All Implemented Interfaces:
- Serializable, Entry, LeftTuple, Tuple
public class LeftTupleImpl
- extends Object
- implements Tuple, Entry, LeftTuple
- See Also:
- Serialized Form
Constructor Summary |
LeftTupleImpl()
|
LeftTupleImpl(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTupleImpl(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTupleImpl(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTupleImpl(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
|
LeftTupleImpl(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
|
LeftTupleImpl
public LeftTupleImpl()
LeftTupleImpl
public LeftTupleImpl(InternalFactHandle factHandle,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTupleImpl
public LeftTupleImpl(LeftTuple leftTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTupleImpl
public LeftTupleImpl(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink)
LeftTupleImpl
public LeftTupleImpl(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
LeftTupleImpl
public LeftTupleImpl(LeftTuple leftTuple,
RightTuple rightTuple,
LeftTuple currentLeftChild,
LeftTuple currentRightChild,
LeftTupleSink sink,
boolean leftTupleMemoryEnabled)
reAdd
public void reAdd()
- Specified by:
reAdd
in interface LeftTuple
reAddLeft
public void reAddLeft()
- Specified by:
reAddLeft
in interface LeftTuple
reAddRight
public void reAddRight()
- Specified by:
reAddRight
in interface LeftTuple
unlinkFromLeftParent
public void unlinkFromLeftParent()
- Specified by:
unlinkFromLeftParent
in interface LeftTuple
unlinkFromRightParent
public void unlinkFromRightParent()
- Specified by:
unlinkFromRightParent
in interface LeftTuple
getIndex
public int getIndex()
- Specified by:
getIndex
in interface LeftTuple
getLeftTupleSink
public LeftTupleSink getLeftTupleSink()
- Specified by:
getLeftTupleSink
in interface LeftTuple
setLeftTupleSink
public void setLeftTupleSink(LeftTupleSink sink)
- Specified by:
setLeftTupleSink
in interface LeftTuple
getLeftParent
public LeftTuple getLeftParent()
- Specified by:
getLeftParent
in interface LeftTuple
setLeftParent
public void setLeftParent(LeftTuple leftParent)
- Specified by:
setLeftParent
in interface LeftTuple
getLeftParentPrevious
public LeftTuple getLeftParentPrevious()
- Specified by:
getLeftParentPrevious
in interface LeftTuple
setLeftParentPrevious
public void setLeftParentPrevious(LeftTuple leftParentLeft)
- Specified by:
setLeftParentPrevious
in interface LeftTuple
getLeftParentNext
public LeftTuple getLeftParentNext()
- Specified by:
getLeftParentNext
in interface LeftTuple
setLeftParentNext
public void setLeftParentNext(LeftTuple leftParentright)
- Specified by:
setLeftParentNext
in interface LeftTuple
getRightParent
public RightTuple getRightParent()
- Specified by:
getRightParent
in interface LeftTuple
setRightParent
public void setRightParent(RightTuple rightParent)
- Specified by:
setRightParent
in interface LeftTuple
getRightParentPrevious
public LeftTuple getRightParentPrevious()
- Specified by:
getRightParentPrevious
in interface LeftTuple
setRightParentPrevious
public void setRightParentPrevious(LeftTuple rightParentLeft)
- Specified by:
setRightParentPrevious
in interface LeftTuple
getRightParentNext
public LeftTuple getRightParentNext()
- Specified by:
getRightParentNext
in interface LeftTuple
setRightParentNext
public void setRightParentNext(LeftTuple rightParentRight)
- Specified by:
setRightParentNext
in interface LeftTuple
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
setFactHandle
public void setFactHandle(InternalFactHandle handle)
getMemory
public LeftTupleList getMemory()
- Specified by:
getMemory
in interface LeftTuple
setMemory
public void setMemory(LeftTupleList memory)
- Specified by:
setMemory
in interface LeftTuple
getPrevious
public Entry getPrevious()
- Specified by:
getPrevious
in interface LeftTuple
setPrevious
public void setPrevious(Entry previous)
- Specified by:
setPrevious
in interface LeftTuple
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()
- Specified by:
getLastHandle
in interface LeftTuple
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()
- Description copied from interface:
Tuple
- Returns the fact handles in reverse order
- Specified by:
getFactHandles
in interface Tuple
toFactHandles
public InternalFactHandle[] toFactHandles()
- Specified by:
toFactHandles
in interface Tuple
setBlocker
public void setBlocker(RightTuple blocker)
- Specified by:
setBlocker
in interface LeftTuple
getBlocker
public RightTuple getBlocker()
- Specified by:
getBlocker
in interface LeftTuple
getBlockedPrevious
public LeftTuple getBlockedPrevious()
- Specified by:
getBlockedPrevious
in interface LeftTuple
setBlockedPrevious
public void setBlockedPrevious(LeftTuple blockerPrevious)
- Specified by:
setBlockedPrevious
in interface LeftTuple
getBlockedNext
public LeftTuple getBlockedNext()
- Specified by:
getBlockedNext
in interface LeftTuple
setBlockedNext
public void setBlockedNext(LeftTuple blockerNext)
- Specified by:
setBlockedNext
in interface LeftTuple
getObject
public Object getObject()
- Specified by:
getObject
in interface LeftTuple
setObject
public void setObject(Object object)
- Specified by:
setObject
in interface LeftTuple
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(LeftTuple other)
- Description copied from interface:
LeftTuple
- We use this equals method to avoid the cast
- Specified by:
equals
in interface LeftTuple
- 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:
getHandle
public InternalFactHandle getHandle()
- Specified by:
getHandle
in interface LeftTuple
setHandle
public void setHandle(InternalFactHandle handle)
- Specified by:
setHandle
in interface LeftTuple
getFirstChild
public LeftTuple getFirstChild()
- Specified by:
getFirstChild
in interface LeftTuple
setFirstChild
public void setFirstChild(LeftTuple firstChild)
- Specified by:
setFirstChild
in interface LeftTuple
getLastChild
public LeftTuple getLastChild()
- Specified by:
getLastChild
in interface LeftTuple
setLastChild
public void setLastChild(LeftTuple lastChild)
- Specified by:
setLastChild
in interface LeftTuple
getSink
public LeftTupleSink getSink()
- Specified by:
getSink
in interface LeftTuple
setSink
public void setSink(LeftTupleSink sink)
- Specified by:
setSink
in interface LeftTuple
setIndex
public void setIndex(int index)
- Specified by:
setIndex
in interface LeftTuple
setParent
public void setParent(LeftTuple parent)
- Specified by:
setParent
in interface LeftTuple
getSubTuple
public LeftTuple getSubTuple(int elements)
- Description copied from interface:
LeftTuple
- 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;
- Specified by:
getSubTuple
in interface LeftTuple
- 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()
- Specified by:
toObjectArray
in interface LeftTuple
getParent
public LeftTuple getParent()
- Specified by:
getParent
in interface LeftTuple
toTupleTree
public String toTupleTree(int indent)
- Specified by:
toTupleTree
in interface LeftTuple
increaseActivationCountForEvents
public void increaseActivationCountForEvents()
- Specified by:
increaseActivationCountForEvents
in interface LeftTuple
decreaseActivationCountForEvents
public void decreaseActivationCountForEvents()
- Specified by:
decreaseActivationCountForEvents
in interface LeftTuple
isExpired
public boolean isExpired()
- Specified by:
isExpired
in interface LeftTuple
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.