|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jeops.engine.Rule
This class models a rule to be evaluated in the inference engine.
RuleBase
Constructor Summary | |
Rule(java.lang.String name,
int priority)
Creates an empty rule, given its name and priority. |
Method Summary | |
void |
addAction(RuleAction action)
Adds a new action to this rule. |
void |
addDeclaration(RuleDeclaration decl)
Adds a new declaration to this rule. |
void |
addLocalDeclaration(RuleLocalDeclaration decl)
Adds a new local declaration to this rule. |
void |
addPrecondition(Precondition prec)
Adds a new precondition to this rule. |
java.lang.Object |
clone()
Clones this rule. |
void |
dump()
Prints the tree for the expression of this precondition. |
void |
dump(int spaces)
Prints the tree for the expression of this precondition. |
boolean |
equals(java.lang.Object obj)
Compares this rule with the given object. |
void |
evaluateLocalDeclarations()
Deprecated. Replaced by evaluateLocalDeclarations(int). |
void |
evaluateLocalDeclarations(int line)
Evaluates the local declarations of this tule. |
void |
fire(KnowledgeBase base)
Fires this rule. |
java.util.Vector |
getDeclarations()
Returns the declarations of this rule. |
java.lang.String |
getName()
Returns the name of this rule. |
int |
getPriority()
Returns the priority of this rule. |
SymbolicTable |
getTable()
Returns the symbolic table to be used in this rule. |
int |
hashCode()
Returns a code used to store this rule in a hashtable. |
boolean |
isFireable()
Checks whether the preconditions of this rule are (all) true. |
boolean |
isFireable(int linha)
Checks whether the preconditions in a given line of this rule are (all) true. |
Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Rule(java.lang.String name, int priority)
name
- this rule's namepriority
- this rule's priority.Method Detail |
public void addAction(RuleAction action)
action
- the new action.public void addDeclaration(RuleDeclaration decl)
decl
- the new declaration.public void addLocalDeclaration(RuleLocalDeclaration decl)
decl
- the new local declaration.public void addPrecondition(Precondition prec)
prec
- the new precondition.public java.lang.Object clone()
public void dump()
public void dump(int spaces)
spaces
- the identation for the printed output.public boolean equals(java.lang.Object obj)
obj
- the object being compared to this rule.true
if this rule is equal to the given
object; false
otherwise.public void evaluateLocalDeclarations() throws MethodEvaluationException, FieldAccessException
evaluateLocalDeclarations(int).
public void evaluateLocalDeclarations(int line) throws MethodEvaluationException, FieldAccessException
line
- the given line.public void fire(KnowledgeBase base) throws RuleNotFiredException
base
- The knowledge base over which this rule will act.public java.util.Vector getDeclarations()
public java.lang.String getName()
public int getPriority()
public SymbolicTable getTable()
public int hashCode()
public boolean isFireable()
true
if the rule can be fired;
false
otherwise.isFireable(int)
public boolean isFireable(int linha)
true
if the premisses in that line
are true'; false
otherwise.isFireable()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |