|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jeops.engine.ConflictSet
This classes models the conflict set of the inference engine. The
conflict set is the place where the fireable rules are stored, and
one of them is to be chosen to fire at the moment.
The user can determine the rule ordering policy used to choose the
rule to fire. It can be achieved by using the
setRuleSorter(RuleSorter)
method.
RuleSorter
Constructor Summary | |
ConflictSet()
Creates a new conflict set, using the default rule sorter. |
|
ConflictSet(RuleSorter ruleSorter)
Creates a new conflict set, given its rule sorter. |
Method Summary | |
void |
flush()
Removes all rules from this conflict set. |
void |
insertRule(Rule rule)
Inserts a rule in this conflict set. |
boolean |
isEmpty()
Checks whether this set has any elements. |
Rule |
nextRule()
Returns the next rule to be fired. |
void |
removeNonFirebleRules()
Re-test all instanciations of the rules in this set to check whether they're still fireable, removing those that aren't anymore. |
void |
removeRulesWith(java.lang.Object obj)
Remove all rules from this set that uses the given object in its instantiations. |
void |
setRuleSorter(RuleSorter ruleSorter)
Modifies this conflict set's rule sorter. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ConflictSet()
public ConflictSet(RuleSorter 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
in this set; true
otherwise.public Rule nextRule() throws NoMoreRulesException
public void removeNonFirebleRules()
public void removeRulesWith(java.lang.Object obj)
obj
- the given objectpublic void setRuleSorter(RuleSorter ruleSorter)
ruleSorter
- the new rule sorter for this conflict set.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |