Package ru.ewc.decita.conditions
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 TypeMethodDescriptionbooleanevaluate(ComputationContext context) Evaluates all the parts of theConditionand provides the result of that evaluation.booleanChecks if all the parts of the Condition are resolved and point to the constant values.default booleanChecks if this Condition resolves tofalse, meaning it is not satisfied.booleanChecks if thisConditionresolves totrue.
-
Method Details
-
evaluate
Evaluates all the parts of theConditionand provides the result of that evaluation.- Parameters:
context- TheComputationContextto evaluateConditionin.- Returns:
- Whether the
Conditionstands 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 thisConditionresolves totrue.- Returns:
- True, if it does.
-
isNotSatisfied
default boolean isNotSatisfied()Checks if this Condition resolves tofalse, meaning it is not satisfied.- Returns:
- True, if this Condition is already computed and resolves to
false.
-