Class NotNode
- java.lang.Object
-
- jadex.rules.rulesystem.rete.nodes.AbstractNode
-
- jadex.rules.rulesystem.rete.nodes.AbstractBetaNode
-
- jadex.rules.rulesystem.rete.nodes.NotNode
-
- All Implemented Interfaces:
INode
,IObjectConsumerNode
,ITupleConsumerNode
,ITupleSourceNode
,java.lang.Cloneable
public class NotNode extends AbstractBetaNode
A not node lets tuples (from left side) pass, when there is no match from the right side.
-
-
Field Summary
-
Fields inherited from class jadex.rules.rulesystem.rete.nodes.AbstractBetaNode
evaluators, indexers, indirects, osource, relevants, tconsumers, tsource
-
Fields inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNode
clones, nodeid
-
-
Constructor Summary
Constructors Constructor Description NotNode(int nodeid, IConstraintEvaluator[] evaluators, ConstraintIndexer[] indexers)
Create a new not node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addMatch(Tuple left, java.lang.Object right, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Add a match to the node memory and propagate if necessary.void
addTuple(Tuple left, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Send a tuple to this node.java.lang.Object
createNodeMemory(IOAVState state)
Create the node memory.protected boolean
isMatchContained(IOAVState state, Tuple left, java.lang.Object right, ReteMemory mem)
Check if a match is contained.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 left, int tupleindex, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Modify a tuple in this node.protected void
propagateModification(Tuple left, java.lang.Object right, int tupleindex, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Propagate a change of a tuple in the result memory.protected void
removeMatch(Tuple left, java.lang.Object right, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Remove a match from the node memory and propagate if necessary.void
removeTuple(Tuple left, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Remove a tuple from this node.-
Methods inherited from class jadex.rules.rulesystem.rete.nodes.AbstractBetaNode
addObject, addTupleConsumer, checkNonindexedConstraints, doClone, fetchObjectMemory, fetchTupleMemory, getConstraintEvaluators, getConstraintIndexers, getIndirectAttributes, getNodeMemory, getObjectSource, getRelevantAttributes, getTupleConsumers, getTupleSource, identityIntersection, intersection, isAffected, modifyObject, removeObject, removeTupleConsumer, setObjectSource, setTupleSource
-
Methods inherited from class jadex.rules.rulesystem.rete.nodes.AbstractNode
checkNodeConsistency, clone, equals, getNodeId, hashCode, toString, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.rules.rulesystem.rete.nodes.INode
checkNodeConsistency, clone, getNodeId
-
-
-
-
Constructor Detail
-
NotNode
public NotNode(int nodeid, IConstraintEvaluator[] evaluators, ConstraintIndexer[] indexers)
Create a new not node.
-
-
Method Detail
-
addTuple
public void addTuple(Tuple left, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Send a tuple to this node.- Specified by:
addTuple
in interfaceITupleConsumerNode
- Overrides:
addTuple
in classAbstractBetaNode
- Parameters:
tuple
- The tuple.
-
removeTuple
public void removeTuple(Tuple left, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Remove a tuple from this node.- Specified by:
removeTuple
in interfaceITupleConsumerNode
- Overrides:
removeTuple
in classAbstractBetaNode
- Parameters:
tuple
- The tuple.
-
modifyTuple
public void modifyTuple(Tuple left, 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:
modifyTuple
in interfaceITupleConsumerNode
- Overrides:
modifyTuple
in classAbstractBetaNode
- Parameters:
left
- The tuple.
-
modifyIndirectObject
public 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:
modifyIndirectObject
in interfaceINode
- Overrides:
modifyIndirectObject
in classAbstractBetaNode
- Parameters:
object
- The changed object.
-
addMatch
protected void addMatch(Tuple left, java.lang.Object right, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Add a match to the node memory and propagate if necessary.- Specified by:
addMatch
in classAbstractBetaNode
-
removeMatch
protected void removeMatch(Tuple left, java.lang.Object right, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Remove a match from the node memory and propagate if necessary.- Specified by:
removeMatch
in classAbstractBetaNode
-
propagateModification
protected void propagateModification(Tuple left, java.lang.Object right, int tupleindex, OAVAttributeType type, java.lang.Object oldvalue, java.lang.Object newvalue, IOAVState state, ReteMemory mem, AbstractAgenda agenda)
Propagate a change of a tuple in the result memory.- Specified by:
propagateModification
in classAbstractBetaNode
-
isMatchContained
protected boolean isMatchContained(IOAVState state, Tuple left, java.lang.Object right, ReteMemory mem)
Check if a match is contained.- Specified by:
isMatchContained
in classAbstractBetaNode
-
createNodeMemory
public java.lang.Object createNodeMemory(IOAVState state)
Create the node memory.- Specified by:
createNodeMemory
in interfaceINode
- Overrides:
createNodeMemory
in classAbstractBetaNode
- Parameters:
state
- The state.- Returns:
- The node memory.
-
-