jeops.engine
Class PriorityRuleSorter
java.lang.Object
|
+--jeops.engine.RuleSorter
|
+--jeops.engine.PriorityRuleSorter
- public class PriorityRuleSorter
- extends RuleSorter
A rule sorter that will choose the rule that has been first declared
in the rules file.
- Version:
- 0.01 13 Dez 1998
- Author:
- Carlos Figueira Filho (csff@di.ufpe.br)
- See Also:
ConflictSet
Method Summary |
void |
flush()
Removes all rules of this sorter. |
void |
insertRule(Rule rule)
Inserts a rule in this sorter. |
Rule |
nextRule()
Returns the next rule to be fired. |
void |
ruleRemoved(java.lang.String ruleName)
Callback method, used to inform this class that a rula was
removed from this sorter. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PriorityRuleSorter
public PriorityRuleSorter()
- Class constructor.
flush
public void flush()
- Removes all rules of this sorter.
- Overrides:
- flush in class RuleSorter
insertRule
public void insertRule(Rule rule)
- Inserts a rule in this sorter.
- Overrides:
- insertRule in class RuleSorter
- Parameters:
rule
- the rule to be inserted.
nextRule
public Rule nextRule()
throws NoMoreRulesException
- Returns the next rule to be fired. In the return of this method,
the symbolic table of the table shall be correctly filled.
- Overrides:
- nextRule in class RuleSorter
- Returns:
- the rule to be fired, among those that have been inserted
in this object, according to the policy defined in this
class.
ruleRemoved
public void ruleRemoved(java.lang.String ruleName)
- Callback method, used to inform this class that a rula was
removed from this sorter.
- Parameters:
ruleName
- the name of the removed rule.