Interface Evaluator

All Known Implementing Classes:
CelPrograms, OneofEvaluator

public interface Evaluator
Evaluator defines a validation evaluator. evaluator implementations may elide type checking of the passed in value, as the types have been guaranteed during the build phase.
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(Value val, boolean failFast)
    Checks that the provided val is valid.
    boolean
    Tautology returns true if the evaluator always succeeds.
  • Method Details

    • tautology

      boolean tautology()
      Tautology returns true if the evaluator always succeeds.
      Returns:
      True if the evaluator always succeeds.
    • evaluate

      ValidationResult evaluate(Value val, boolean failFast) throws ExecutionException
      Checks that the provided val is valid. Unless failFast is true, evaluation attempts to find all Violations present in val instead of returning a ValidationResult on the first Violation.
      Parameters:
      val - The value to validate.
      failFast - If true, validation stops after the first failure.
      Returns:
      The result of validation on the specified value.
      Throws:
      ExecutionException - If evaluation fails to complete.