|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectformulaVisited.VisitorEvaluate
public class VisitorEvaluate
A visitor that evaluates each formula, returning Boolean.TRUE if the formula is true, Boolean.FALSE if the formula is false, and null if its value cannot be determined. The presence of undefined logical values, or predicates whoses value is not defined for every domain entity, can result in formulas whose logical values that cannot be determined.
| Constructor Summary | |
|---|---|
VisitorEvaluate(Environment _env)
Construct a VisitorEvaluate that evaluates formulas in the given environment. |
|
| Method Summary | |
|---|---|
java.lang.Object |
visit(Conjunction _f)
Calculates the result for a Conjunction. A conjunction is true if both its subformulas are true, false if either of its subformulas is false, and unknown otherwise. |
java.lang.Object |
visit(Disjunction _f)
Calculates the result for a Disjunction. A disjunction is false if both its subformulas are false, true if either of its subformulas is true, and unknown otherwise. |
java.lang.Object |
visit(LogicalConstant _f)
Calculates the result for a LogicalConstant. The value of LogicalConstant.one() is true, and
the value of LogicalConstant.zero() is false. |
java.lang.Object |
visit(LogicalVariable _f)
Calculates the result for a LogicalVariable. The value of a logical variable is the value the variable is bound to in the environment, and unknown if the variable is bound to no value. |
java.lang.Object |
visit(Negation _f)
Calculates the result for a Negation. A negation is false if its subformula is true, false if its subformula is true, and unknown if its subformula's value is unknown. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VisitorEvaluate(Environment _env)
_env - The environment.| Method Detail |
|---|
public java.lang.Object visit(Conjunction _f)
visit in interface Visitorpublic java.lang.Object visit(Disjunction _f)
visit in interface Visitorpublic java.lang.Object visit(LogicalConstant _f)
LogicalConstant.one() is true, and
the value of LogicalConstant.zero() is false.
visit in interface Visitorpublic java.lang.Object visit(LogicalVariable _f)
visit in interface Visitorpublic java.lang.Object visit(Negation _f)
visit in interface Visitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||