Class TerminalNode
- java.lang.Object
- 
- jadex.rules.rulesystem.rete.nodes.AbstractNode
- 
- jadex.rules.rulesystem.rete.nodes.TerminalNode
 
 
- 
- All Implemented Interfaces:
- INode,- ITupleConsumerNode,- java.lang.Cloneable
 
 public class TerminalNode extends AbstractNode implements ITupleConsumerNode A terminal node stores the full matches and notifies the agenda of the activated conditions.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classTerminalNode.ReteVariableAssignmentsThe rete variable assignment help extracting values for varaibles.
 - 
Field SummaryFields Modifier and Type Field Description protected java.util.MapextractorsA mapping for fetching variable values (variable -> extractor).protected AttributeSetindirectsThe set of indirect attributes.protected AttributeSetrelevantsThe set of relevant attributes.protected IRuleruleThe rule of the terminal node.protected ITupleSourceNodetsourceThe tuple source.- 
Fields inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNodeclones, nodeid
 
- 
 - 
Constructor SummaryConstructors Constructor Description TerminalNode(int nodeid, IRule rule, java.util.Map extractors)Create a new node.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)Send an tuple to this node.java.lang.ObjectcreateNodeMemory(IOAVState state)Create the node memory.protected voiddoClone(java.lang.Object theclone)Do clone makes a deep clone without regarding cycles.AttributeSetgetIndirectAttributes()Get the set of indirect attribute types.java.util.CollectiongetNodeMemory(ReteMemory mem)Get the memory for this node.AttributeSetgetRelevantAttributes()Get the set of relevant attribute types.IRulegetRule()Get the rule.ITupleSourceNodegetTupleSource()Get the tuple source of this node.voidmodifyIndirectObject(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.voidmodifyTuple(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.voidremoveTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda)Remove a tuple from this node.voidsetTupleSource(ITupleSourceNode node)Set the tuple source of this node.- 
Methods inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNodecheckNodeConsistency, clone, equals, getNodeId, hashCode, toString, toString
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.rules.rulesystem.rete.nodes.INodecheckNodeConsistency, clone, getNodeId
 
- 
 
- 
- 
- 
Field Detail- 
tsourceprotected ITupleSourceNode tsource The tuple source.
 - 
extractorsprotected java.util.Map extractors A mapping for fetching variable values (variable -> extractor).
 - 
ruleprotected IRule rule The rule of the terminal node.
 - 
relevantsprotected volatile AttributeSet relevants The set of relevant attributes.
 - 
indirectsprotected volatile AttributeSet indirects The set of indirect attributes.
 
- 
 - 
Constructor Detail- 
TerminalNodepublic TerminalNode(int nodeid, IRule rule, java.util.Map extractors)Create a new node.
 
- 
 - 
Method Detail- 
addTuplepublic void addTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda) Send an tuple to this node.- Specified by:
- addTuplein interface- ITupleConsumerNode
- Parameters:
- tuple- The tuple.
 
 - 
removeTuplepublic void removeTuple(Tuple tuple, IOAVState state, ReteMemory mem, AbstractAgenda agenda) Remove a tuple from this node.- Specified by:
- removeTuplein interface- ITupleConsumerNode
- Parameters:
- tuple- The tuple.
 
 - 
modifyTuplepublic 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.- Specified by:
- modifyTuplein interface- ITupleConsumerNode
- Parameters:
- tuple- The tuple.
 
 - 
modifyIndirectObjectpublic 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.- Specified by:
- modifyIndirectObjectin interface- INode
- Parameters:
- object- The changed object.
 
 - 
setTupleSourcepublic void setTupleSource(ITupleSourceNode node) Set the tuple source of this node.- Specified by:
- setTupleSourcein interface- ITupleConsumerNode
- Parameters:
- node- The tuple source node.
 
 - 
getTupleSourcepublic ITupleSourceNode getTupleSource() Get the tuple source of this node.- Specified by:
- getTupleSourcein interface- ITupleConsumerNode
- Returns:
- The object source node.
 
 - 
createNodeMemorypublic java.lang.Object createNodeMemory(IOAVState state) Create the node memory.- Specified by:
- createNodeMemoryin interface- INode
- Parameters:
- state- The state.
- Returns:
- The node memory.
 
 - 
getNodeMemorypublic java.util.Collection getNodeMemory(ReteMemory mem) Get the memory for this node.- Specified by:
- getNodeMemoryin interface- INode
- Returns:
- The memory.
 
 - 
getRelevantAttributespublic AttributeSet getRelevantAttributes() Get the set of relevant attribute types.- Specified by:
- getRelevantAttributesin interface- INode
 
 - 
getIndirectAttributespublic AttributeSet getIndirectAttributes() Get the set of indirect attribute types. I.e. attributes of objects, which are not part of an object conditions (e.g. for chained extractors)- Specified by:
- getIndirectAttributesin interface- INode
- Returns:
- The relevant attribute types.
 
 - 
getRulepublic IRule getRule() Get the rule.- Returns:
- The rule.
 
 - 
doCloneprotected void doClone(java.lang.Object theclone) Do clone makes a deep clone without regarding cycles. Method is overridden by subclasses to actually incorporate their attributes.- Specified by:
- doClonein class- AbstractNode
- Parameters:
- theclone- The clone.
 
 
- 
 
-