Package jadex.rules.rulesystem.rete
Class RetePatternMatcherFunctionality
- java.lang.Object
-
- jadex.rules.rulesystem.rete.RetePatternMatcherFunctionality
-
- All Implemented Interfaces:
IPatternMatcherFunctionality
,IRulebaseListener
,java.lang.Cloneable
public class RetePatternMatcherFunctionality extends java.lang.Object implements IPatternMatcherFunctionality, IRulebaseListener, java.lang.Cloneable
The static (reusable) part of a Rete matcher (i.e. the Rete network).
-
-
Constructor Summary
Constructors Constructor Description RetePatternMatcherFunctionality(IRulebase rulebase)
Create a new Rete pattern matcher functionality.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Clone this object.IPatternMatcherState
createMatcherState(IOAVState state, AbstractAgenda agenda)
Create a pattern matcher instance for a given state.ReteNode
getReteNode()
Get the Rete node.IRulebase
getRulebase()
Get the rulebase.void
ruleAdded(IRule rule)
Notification when a rule has been added.void
ruleRemoved(IRule rule)
Notification when a rule has been removed.
-
-
-
Constructor Detail
-
RetePatternMatcherFunctionality
public RetePatternMatcherFunctionality(IRulebase rulebase)
Create a new Rete pattern matcher functionality.
-
-
Method Detail
-
getRulebase
public IRulebase getRulebase()
Get the rulebase.- Specified by:
getRulebase
in interfaceIPatternMatcherFunctionality
- Returns:
- The rulebase.
-
ruleAdded
public void ruleAdded(IRule rule)
Notification when a rule has been added.- Specified by:
ruleAdded
in interfaceIRulebaseListener
- Parameters:
rule
- The added rule.
-
ruleRemoved
public void ruleRemoved(IRule rule)
Notification when a rule has been removed.- Specified by:
ruleRemoved
in interfaceIRulebaseListener
- Parameters:
rule
- The removed rule.
-
createMatcherState
public IPatternMatcherState createMatcherState(IOAVState state, AbstractAgenda agenda)
Create a pattern matcher instance for a given state.- Specified by:
createMatcherState
in interfaceIPatternMatcherFunctionality
- Parameters:
state
- The state.agenda
- The agenda.
-
getReteNode
public ReteNode getReteNode()
Get the Rete node.
-
clone
public java.lang.Object clone()
Clone this object.- Specified by:
clone
in interfaceIPatternMatcherFunctionality
- Overrides:
clone
in classjava.lang.Object
- Returns:
- A clone of this object.
-
-