Package jadex.rules.eca
Class Rulebase
- java.lang.Object
-
- jadex.rules.eca.Rulebase
-
-
Field Summary
Fields Modifier and Type Field Description protected MatcherNode
matcher
The rule matcher node.protected java.util.Map<java.lang.String,IRule<?>>
rules
The rules per name.
-
Constructor Summary
Constructors Constructor Description Rulebase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRule(IRule<?> rule)
Add a new rule.boolean
containsRule(java.lang.String name)
Test if a rule is contained in the rule base.IRule<?>
getRule(java.lang.String name)
Get the rule.java.util.Collection<IRule<?>>
getRules()
Get all rules.java.util.List<IRule<?>>
getRules(EventType event)
Get all rules that are relevant for an event type.void
removeRule(java.lang.String rulename)
Remove a rule.void
updateRule(IRule<?> rule)
Update a rule.
-
-
-
Field Detail
-
rules
protected java.util.Map<java.lang.String,IRule<?>> rules
The rules per name.
-
matcher
protected MatcherNode matcher
The rule matcher node.
-
-
Method Detail
-
addRule
public void addRule(IRule<?> rule)
Add a new rule.
-
removeRule
public void removeRule(java.lang.String rulename)
Remove a rule.- Specified by:
removeRule
in interfaceIRulebase
- Parameters:
rule
- The rule.
-
updateRule
public void updateRule(IRule<?> rule)
Update a rule.- Specified by:
updateRule
in interfaceIRulebase
- Parameters:
rule
- The rule.
-
getRules
public java.util.List<IRule<?>> getRules(EventType event)
Get all rules that are relevant for an event type.
-
getRule
public IRule<?> getRule(java.lang.String name)
Get the rule.
-
containsRule
public boolean containsRule(java.lang.String name)
Test if a rule is contained in the rule base.- Specified by:
containsRule
in interfaceIRulebase
- Parameters:
name
- The rule name.- Returns:
- True, if contained.
-
-