|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jeops.engine.RuleSorter
Abstract class that defines the methods needed by any rule sorter, used by the conflict set to choose the rule to be fired.
ConflictSet
Constructor Summary | |
RuleSorter()
Class constructor. |
Method Summary | |
void |
flush()
Removes all rules of this sorter. |
void |
insertRule(Rule rule)
Inserts a rule in this sorter. |
boolean |
isEmpty()
Checks whether this sorter has any rule to be fired. |
abstract Rule |
nextRule()
Returns the next rule to be fired. |
void |
removeNonFireableRules()
Re-test all instanciations of the rules to check whether they're still fireable, removing those that aren't anymore. |
void |
removeRule(Rule rule)
Remove the given rule from the fireable rules. |
void |
removeRulesWith(java.lang.Object obj)
Remove all rules from the fireable ones that uses the given object in its instantiations. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RuleSorter()
Method Detail |
public void flush()
public void insertRule(Rule rule)
rule
- the rule to be inserted.public boolean isEmpty()
false
if there is at least one fireable rule;
true
otherwise.public abstract Rule nextRule() throws NoMoreRulesException
public void removeNonFireableRules()
public void removeRule(Rule rule)
rule
- the given rulepublic void removeRulesWith(java.lang.Object obj)
obj
- the given object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |