@PersistantProperties(properties=@PersistantProperty(property="condition")) public class MConditionNot extends AbstractCondition
ICondition
implementation allowing to invert the result of another ICondition
Constructor and Description |
---|
MConditionNot() |
MConditionNot(ICondition condition) |
Modifier and Type | Method and Description |
---|---|
MConditionNot |
clone()
Clones the Addon.
|
void |
compile(ICompilationContext ctxt)
Compiles condition and validates data.
|
ICondition |
getCondition() |
CostInfo |
getEstimatedCost(ICompilationContext ctxt)
Estimates the condition complexity, to allow callers to optimize calls.
|
String |
getImplementationId()
Unique addon implementation ID.
|
protected ConditionEquivalence |
internalIsEquivalent(ICondition o)
Called by
AbstractCondition.internalIsEquivalent(ICondition) if the other condition is not an instance of MConditionNot . |
boolean |
isCacheUsed()
Returns false by default.
|
boolean |
isConstantValue()
Tells if this condition returns a constant result for all executions.
|
ConditionEquivalence |
isEquivalent(ICondition o)
Handles the facts that provided condition is null or an instance of
MConditionNot . |
protected boolean |
pEquals(AbstractCondition o)
Tests equality on other parameters than "not".
|
protected boolean |
pEvaluate(IExecutionContext ctxt) |
protected int |
pHashCode()
Computes hashCode on other parameters than "not".
|
protected void |
pToString(OuterWithLevel outer)
Finishes toString output.
|
void |
setCondition(ICondition condition) |
combine, combineToNewSet, equals, evaluate, hashCode, isNot, isShouldBeWrappedToConstantValue, setNot, toString
getInternalCacheIdentifier, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, toString, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
finalize, getClass, notify, notifyAll, wait, wait, wait
getInternalCacheIdentifier, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
public static final String NOT_ID
public MConditionNot()
public MConditionNot(ICondition condition)
public void compile(ICompilationContext ctxt) throws MRuleValidationException
ICondition
MRuleValidationException
- if validation problem detected.ICondition.compile(ICompilationContext)
public CostInfo getEstimatedCost(ICompilationContext ctxt) throws MRuleValidationException
ICondition
MRuleValidationException
- if validation problem detected.public boolean isConstantValue()
ICondition
protected boolean pEvaluate(IExecutionContext ctxt) throws MConditionEvaluationException
pEvaluate
in class AbstractCondition
MConditionEvaluationException
ICondition.evaluate(IExecutionContext)
public String getImplementationId()
IAddon
public boolean isCacheUsed()
AbstractAddon
isCacheUsed
in interface IAddon
isCacheUsed
in class AbstractAddon
protected void pToString(OuterWithLevel outer) throws IOException
AbstractCondition
pToString
in class AbstractCondition
IOException
public MConditionNot clone()
IAddon
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in interface ICondition
clone
in class AbstractCondition
protected boolean pEquals(AbstractCondition o)
AbstractCondition
pEquals
in class AbstractCondition
protected int pHashCode()
AbstractCondition
pHashCode
in class AbstractCondition
public ConditionEquivalence isEquivalent(ICondition o)
AbstractCondition
MConditionNot
.
Otherwise returns null.isEquivalent
in interface ICondition
isEquivalent
in class AbstractCondition
protected ConditionEquivalence internalIsEquivalent(ICondition o)
AbstractCondition
AbstractCondition.internalIsEquivalent(ICondition)
if the other condition is not an instance of MConditionNot
.internalIsEquivalent
in class AbstractCondition
public ICondition getCondition()
public void setCondition(ICondition condition)