@PersistantProperties(properties=@PersistantProperty(property="not",defaultValue="false")) public interface ICondition extends IAddon
Modifier and Type | Method and Description |
---|---|
ICondition |
clone()
Clones the Condition.
|
ICondition |
combine(ILogicalOperator operator,
ICondition condition)
Creates a new ICondition combining the result of the current one with the other provided one, using
the provided operator.
|
void |
compile(ICompilationContext ctxt)
Compiles condition and validates data.
|
boolean |
evaluate(IExecutionContext ctxt)
Evaluates the result of the rule.
|
CostInfo |
getEstimatedCost(ICompilationContext ctxt)
Estimates the condition complexity, to allow callers to optimize calls.
|
boolean |
isConstantValue()
Tells if this condition returns a constant result for all executions.
|
ConditionEquivalence |
isEquivalent(ICondition o)
Tells if this condition is strictly equivalent or a strict negation of the other provided condition.
|
boolean |
isNot()
Allows to invert condition's behavior.
|
boolean |
isShouldBeWrappedToConstantValue()
Tells if this condition should be wrapped into a constant value for optimization.
|
void |
setNot(boolean not)
Allows to invert condition's behavior.
|
getImplementationId, getInternalCacheIdentifier, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
void compile(ICompilationContext ctxt) throws MRuleValidationException
MRuleValidationException
- if validation problem detected.CostInfo getEstimatedCost(ICompilationContext ctxt) throws MRuleValidationException
MRuleValidationException
- if validation problem detected.boolean evaluate(IExecutionContext ctxt) throws MConditionEvaluationException
MConditionEvaluationException
ICondition combine(ILogicalOperator operator, ICondition condition)
operator
- Operator to use to combine the results.condition
- Condition to combine withICondition clone()
clone
in interface IAddon
clone
in interface IMRulesObject
ConditionEquivalence isEquivalent(ICondition o)
MConditionNot
implementation
or that the order of conditions in Condition Sets may or may not have influence on equivalence
depending on the operator.boolean isConstantValue()
boolean isShouldBeWrappedToConstantValue()
boolean isNot()
void setNot(boolean not)