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
Coordinate
s. 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 TypeMethodDescriptionboolean
evaluate
(ComputationContext context) Evaluates all the parts of theCondition
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 tofalse
, meaning it is not satisfied.boolean
Checks if thisCondition
resolves totrue
.
-
Method Details
-
evaluate
Evaluates all the parts of theCondition
and provides the result of that evaluation.- Parameters:
context
- TheComputationContext
to evaluateCondition
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 thisCondition
resolves 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
.
-