Class NotCondition

java.lang.Object
ru.ewc.decita.conditions.UnaryCondition
ru.ewc.decita.conditions.NotCondition
All Implemented Interfaces:
Condition

public final class NotCondition extends UnaryCondition
I represent a negation, i.e. a Condition that is satisfied when its base Condition is not.
Since:
0.3
  • Constructor Details

    • NotCondition

      public NotCondition(Condition delegate)
      Ctor.
      Parameters:
      delegate - The base Condition to compute against.
  • Method Details

    • evaluate

      public boolean evaluate(ComputationContext context) throws DecitaException
      Description copied from interface: Condition
      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

      public boolean isEvaluated()
      Description copied from interface: Condition
      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

      public boolean isSatisfied()
      Description copied from interface: Condition
      Checks if this Condition resolves to true.
      Returns:
      True, if it does.