Package jadex.rules.rulesystem
Class Rulebase
- java.lang.Object
-
- jadex.rules.rulesystem.Rulebase
-
-
Constructor Summary
Constructors Constructor Description Rulebase()
Create a new rulebase.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRule(IRule rule)
Add a rule.void
addRulebaseListener(IRulebaseListener listener)
Add a new rulebase listener.java.lang.Object
clone()
Clone this object.IRule
getRule(java.lang.String name)
Get a rule with a given name.java.util.Collection
getRules()
Get all rules.static java.lang.String
getUniqueRuleName(IRulebase rb, java.lang.String rulename)
Get a unique rulename for a given rulename.void
removeRule(IRule rule)
Remove a rule.void
removeRulebaseListener(IRulebaseListener listener)
Remove a rulebase listener.
-
-
-
Method Detail
-
addRule
public void addRule(IRule rule)
Add a rule.
-
removeRule
public void removeRule(IRule rule)
Remove a rule.- Specified by:
removeRule
in interfaceIRulebase
- Parameters:
rule
- The rule to remove.
-
getRules
public java.util.Collection getRules()
Get all rules.
-
getRule
public IRule getRule(java.lang.String name)
Get a rule with a given name.
-
addRulebaseListener
public void addRulebaseListener(IRulebaseListener listener)
Add a new rulebase listener.- Specified by:
addRulebaseListener
in interfaceIRulebase
- Parameters:
listener
- The rulebase listener.
-
removeRulebaseListener
public void removeRulebaseListener(IRulebaseListener listener)
Remove a rulebase listener.- Specified by:
removeRulebaseListener
in interfaceIRulebase
- Parameters:
listener
- The rulebase listener.
-
clone
public java.lang.Object clone()
Clone this object.
-
getUniqueRuleName
public static java.lang.String getUniqueRuleName(IRulebase rb, java.lang.String rulename)
Get a unique rulename for a given rulename.- Parameters:
rb
- The rulebase.rulename
- The rulename.- Returns:
- The (possibly modified) rulename.
-
-