Interface IConstraintEvaluator
- All Known Implementing Classes:
EvaluationVisitor
public interface IConstraintEvaluator
Interface to the constraint evaluator to avoid unnecessary access when passing along an evaluation visitor.
- Author:
- Holger Eichelberger
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the constraint evaluation indicates that the evaluated constraint failed.booleanReturns whether the constraint evaluation indicates that the evaluated constraint was fulfilled.booleanReturns whether the constraint was internally evaluated to false but finally leads to a successful execution and shall lead to a warning to the user.booleanReturns whether the constraint evaluation indicates that (at least one part of) the constraint was undefined.getMessage(int index) Returns the specified evaluation message.intReturns the number of messages.Returns the evaluation result.
-
Method Details
-
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
Returns the specified evaluation message.- Parameters:
index- the message to return- Returns:
- the specified message
- Throws:
IndexOutOfBoundsException- ifindex < 0 || index >=getMessageCount()
-