public class TerminalNode extends AbstractNode implements ITupleConsumerNode
| Modifier and Type | Class and Description |
|---|---|
static class |
TerminalNode.ReteVariableAssignments
The rete variable assignment help extracting values for varaibles.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
extractors
A mapping for fetching variable values (variable -> extractor).
|
protected AttributeSet |
indirects
The set of indirect attributes.
|
protected AttributeSet |
relevants
The set of relevant attributes.
|
protected IRule |
rule
The rule of the terminal node.
|
protected ITupleSourceNode |
tsource
The tuple source.
|
clones, nodeid| Constructor and Description |
|---|
TerminalNode(int nodeid,
IRule rule,
java.util.Map extractors)
Create a new node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTuple(Tuple tuple,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Send an tuple to this node.
|
java.lang.Object |
createNodeMemory(IOAVState state)
Create the node memory.
|
protected void |
doClone(java.lang.Object theclone)
Do clone makes a deep clone without regarding cycles.
|
AttributeSet |
getIndirectAttributes()
Get the set of indirect attribute types.
|
java.util.Collection |
getNodeMemory(ReteMemory mem)
Get the memory for this node.
|
AttributeSet |
getRelevantAttributes()
Get the set of relevant attribute types.
|
IRule |
getRule()
Get the rule.
|
ITupleSourceNode |
getTupleSource()
Get the tuple source of this node.
|
void |
modifyIndirectObject(java.lang.Object object,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Propagate an indirect object change to this node.
|
void |
modifyTuple(Tuple tuple,
int tupleindex,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Modify a tuple in this node.
|
void |
removeTuple(Tuple tuple,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
Remove a tuple from this node.
|
void |
setTupleSource(ITupleSourceNode node)
Set the tuple source of this node.
|
checkNodeConsistency, clone, equals, getNodeId, hashCode, toString, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcheckNodeConsistency, clone, getNodeIdprotected ITupleSourceNode tsource
protected java.util.Map extractors
protected IRule rule
protected volatile AttributeSet relevants
protected volatile AttributeSet indirects
public TerminalNode(int nodeid,
IRule rule,
java.util.Map extractors)
public void addTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
addTuple in interface ITupleConsumerNodetuple - The tuple.public void removeTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
removeTuple in interface ITupleConsumerNodetuple - The tuple.public void modifyTuple(Tuple tuple, int tupleindex, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
modifyTuple in interface ITupleConsumerNodetuple - The tuple.public void modifyIndirectObject(java.lang.Object object,
OAVAttributeType type,
java.lang.Object oldvalue,
java.lang.Object newvalue,
IOAVState state,
ReteMemory mem,
AbstractAgenda agenda)
modifyIndirectObject in interface INodeobject - The changed object.public void setTupleSource(ITupleSourceNode node)
setTupleSource in interface ITupleConsumerNodenode - The tuple source node.public ITupleSourceNode getTupleSource()
getTupleSource in interface ITupleConsumerNodepublic java.lang.Object createNodeMemory(IOAVState state)
createNodeMemory in interface INodestate - The state.public java.util.Collection getNodeMemory(ReteMemory mem)
getNodeMemory in interface INodepublic AttributeSet getRelevantAttributes()
getRelevantAttributes in interface INodepublic AttributeSet getIndirectAttributes()
getIndirectAttributes in interface INodepublic IRule getRule()
protected void doClone(java.lang.Object theclone)
doClone in class AbstractNodetheclone - The clone.