Interface ISolutionEvaluator

All Known Implementing Classes:
SolutionEvaluator, TimeoutSolutionEvaluatorDecorator

public interface ISolutionEvaluator
Evaluates an underlying execution context on set rules. These rules typically match a specific problem case, which solution for is being evaluated for.
Author:
Erik Zemčík
  • Method Details

    • hasFinished

      boolean hasFinished()
      Checks if the evaluator has finished its evaluation.
      Returns:
      true if evaluator has finished, else false
    • isSuccessful

      boolean isSuccessful()
      Checks if the evaluation of the execution context is successful. Result of this method should only be considered if the evaluator has finished its evaluation.
      Returns:
      true if the evaluation has ended and is successful, else false
    • getExecutionContext

      IExecutionContext getExecutionContext()
      Returns the execution context that is being evaluated by the evaluator.
      Returns:
      evaluated execution context
    • step

      void step()
      Steps the underlying execution and checks if the new state satisfies the rules being evaluated. If the underlying execution throws an exception, the evaluation is considered finished as a failure and the StepEvaluationException is thrown with the details of the failure.
      Throws:
      StepEvaluationException - if underlying execution threw an exception during the step
      IllegalStateException - if step was attempted when evaluation has already finished