public abstract class AbstractMathOperator extends AbstractAddon implements IMathOperator
Constructor and Description |
---|
AbstractMathOperator() |
Modifier and Type | Method and Description |
---|---|
AbstractMathOperator |
clone()
Clones the Addon.
|
void |
compile(ICompilationContext ctxt,
IReadAccessor left,
IReadAccessor right)
Does nothing except logging in basic implementation
|
protected void |
compileOperator(ICompilationContext ctxt,
IReadAccessor left,
IReadAccessor right)
Does nothing in basic implementation
|
protected abstract BigDecimal |
compute(BigDecimal nleft,
BigDecimal nright) |
Number |
compute(IExecutionContext ctxt,
IReadAccessor left,
IReadAccessor right)
Evaluate result for this operator.
|
protected abstract int |
compute(int nleft,
int nright) |
protected abstract long |
compute(long nleft,
long nright) |
protected Number |
compute(Number nleft,
Number nright)
Chooses between compute implementations.
|
boolean |
equals(Object o) |
protected boolean |
forceUseOfBigDecimal() |
int |
hashCode() |
protected Number |
redirectToBigDecimal(Number nleft,
Number nright)
If no specific applicable implem of compute has been found, this method is called and default implem redirects to BigDecimal computation.
|
void |
toString(OuterWithLevel outer)
Method used to send String representation of the current object to the
OuterWithLevel . |
getInternalCacheIdentifier, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, toString, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
finalize, getClass, notify, notifyAll, wait, wait, wait
getRepresentation, getWeight
getImplementationId, getInternalCacheIdentifier, isCacheUsed, isInternalCacheIdentifierNeeded, optimize, resetCachedData, setInternalCacheIdentifier, wasRegistered
getDebugInfo, getDescription, getName, setDebugInfo, setDescription, setName
public final void compile(ICompilationContext ctxt, IReadAccessor left, IReadAccessor right) throws MRuleValidationException
compile
in interface IMathOperator
left
- If known, left operand. If unknown, null value is handled.right
- If known, right operand. If unknown, null value is handled.MRuleValidationException
public Number compute(IExecutionContext ctxt, IReadAccessor left, IReadAccessor right) throws MAccessorException
IMathOperator
compute
in interface IMathOperator
MAccessorException
protected Number compute(Number nleft, Number nright) throws MAccessorException
MAccessorException
protected Number redirectToBigDecimal(Number nleft, Number nright) throws MAccessorException
MAccessorException
protected abstract BigDecimal compute(BigDecimal nleft, BigDecimal nright)
protected abstract int compute(int nleft, int nright)
protected abstract long compute(long nleft, long nright)
protected boolean forceUseOfBigDecimal()
protected void compileOperator(ICompilationContext ctxt, IReadAccessor left, IReadAccessor right) throws MRuleValidationException
MRuleValidationException
public void toString(OuterWithLevel outer) throws IOException
Outable
OuterWithLevel
.toString
in interface Outable
IOException
public AbstractMathOperator clone()
IAddon
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in interface IMathOperator
clone
in class AbstractAddon