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 Type
    Method
    Description
    boolean
    Returns whether the constraint evaluation indicates that the evaluated constraint failed.
    boolean
    Returns whether the constraint evaluation indicates that the evaluated constraint was fulfilled.
    boolean
    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.
    boolean
    Returns whether the constraint evaluation indicates that (at least one part of) the constraint was undefined.
    getMessage(int index)
    Returns the specified evaluation message.
    int
    Returns 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:
      true if the constraint is fulfilled, false else
    • 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:
      true if the constraint failed, false else
    • constraintUndefined

      boolean constraintUndefined()
      Returns whether the constraint evaluation indicates that (at least one part of) the constraint was undefined.
      Returns:
      true if (at least one part of) the constraint was undefined, false else
    • 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:
      true if the constraint shall be issued as a warning, false else.
    • 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:
      IndexOutOfBoundsException - if index < 0 || index >= getMessageCount()