Interface Condition

All Known Implementing Classes:
AlwaysTrueCondition, BinaryCondition, EqualsCondition, GreaterThanCondition, LessThanCondition, NotCondition, UnaryCondition

public interface Condition
I am an assertion made for two Coordinates. My main responsibility is to compute the result of such an assertion and answer it to the computation engine.
Since:
0.1
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Evaluates all the parts of the Condition and provides the result of that evaluation.
    boolean
    Checks if all the parts of the Condition are resolved and point to the constant values.
    default boolean
    Checks if this Condition resolves to false, meaning it is not satisfied.
    boolean
    Checks if this Condition resolves to true.
  • Method Details

    • evaluate

      boolean evaluate(ComputationContext context) throws DecitaException
      Evaluates all the parts of the Condition and provides the result of that evaluation.
      Parameters:
      context - The ComputationContext to evaluate Condition in.
      Returns:
      Whether the Condition stands true.
      Throws:
      DecitaException - If the evaluation cannot be performed.
    • isEvaluated

      boolean isEvaluated()
      Checks if all the parts of the Condition are resolved and point to the constant values.
      Returns:
      True, if both parts of the Condition are evaluated.
    • isSatisfied

      boolean isSatisfied()
      Checks if this Condition resolves to true.
      Returns:
      True, if it does.
    • isNotSatisfied

      default boolean isNotSatisfied()
      Checks if this Condition resolves to false, meaning it is not satisfied.
      Returns:
      True, if this Condition is already computed and resolves to false.