Interface IConstraintEvaluator
-
- All Known Implementing Classes:
EvaluationVisitor,EvalVisitor
public interface IConstraintEvaluatorInterface to the constraint evaluator to avoid unnecessary access when passing along an evaluation visitor.- Author:
- Holger Eichelberger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanconstraintFailed()Returns whether the constraint evaluation indicates that the evaluated constraint failed.booleanconstraintFulfilled()Returns whether the constraint evaluation indicates that the evaluated constraint was fulfilled.booleanconstraintIsAWarning()Returns whether the constraint was internally evaluated to false but finally leads to a successful execution and shall lead to a warning to the user.booleanconstraintUndefined()Returns whether the constraint evaluation indicates that (at least one part of) the constraint was undefined.EvaluationVisitor.MessagegetMessage(int index)Returns the specified evaluation message.intgetMessageCount()Returns the number of messages.ValuegetResult()Returns the evaluation result.
-
-
-
Method Detail
-
constraintFulfilled
boolean constraintFulfilled()
Returns whether the constraint evaluation indicates that the evaluated constraint was fulfilled.- Returns:
trueif the constraint is fulfilled,falseelse
-
constraintFailed
boolean constraintFailed()
Returns whether the constraint evaluation indicates that the evaluated constraint failed. For instance, the following should fail:a = true; b = false; !a or b- Returns:
trueif the constraint failed,falseelse
-
constraintUndefined
boolean constraintUndefined()
Returns whether the constraint evaluation indicates that (at least one part of) the constraint was undefined.- Returns:
trueif (at least one part of) the constraint was undefined,falseelse
-
constraintIsAWarning
boolean constraintIsAWarning()
Returns whether the constraint was internally evaluated to false but finally leads to a successful execution and shall lead to a warning to the user.- Returns:
trueif the constraint shall be issued as a warning,falseelse.
-
getResult
Value getResult()
Returns the evaluation result.- Returns:
- may be null in case of an expression that cannot be evaluated (shall lead to an exception)
-
getMessageCount
int getMessageCount()
Returns the number of messages.- Returns:
- the number of messages
-
getMessage
EvaluationVisitor.Message getMessage(int index)
Returns the specified evaluation message.- Parameters:
index- the message to return- Returns:
- the specified message
- Throws:
java.lang.IndexOutOfBoundsException- ifindex < 0 || index >=getMessageCount()
-
-