public class Divide extends MArithmeticAccessor
MArithmeticAccessor.InternalIterator
IReadAccessor.Standalone
Constructor and Description |
---|
Divide() |
Divide(IReadAccessor... sources) |
Divide(IReadAccessor source) |
Divide(List<IReadAccessor> sources) |
Divide(Rounder decimals) |
Divide(Rounder decimals,
IReadAccessor... sources) |
Divide(Rounder decimals,
IReadAccessor source) |
Divide(Rounder decimals,
List<IReadAccessor> sources) |
Modifier and Type | Method and Description |
---|---|
void |
compileValue(ICompilationContext ctxt,
Class<?> expectedType)
Checks that decimals property is present.
|
BigDecimal |
evaluate(IExecutionContext ctxt,
MArithmeticAccessor.InternalIterator values)
Performs the arithmetic operation.
|
String |
getImplementationId()
Unique addon implementation ID.
|
protected BigDecimal |
lastDivision(BigDecimal ret,
BigDecimal bd)
Performs last division, with correct formatting.
|
protected boolean |
shouldFormatResult()
Returns false, as Divide formats results by default.
|
clone, compileCollection, equals, format, getCondition, getDecimals, getEstimatedReadCost, getGenericCollectionType, getInternalExpectedType, getMaxDecimals, getProperty, getSource, getType, getValues, hashCode, internalGet, isCacheUsed, isShouldIterate, setCondition, setDecimals, setProperty, setSource, setValues, toString
castToExpected, compileRead, compileRead, compileRead, compileRead, get, getGenericTypes, isConstantValue, isShouldBeWrappedToConstantValue, isShouldNotCache
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 DIVIDE_ID
public Divide()
public Divide(IReadAccessor source)
public Divide(List<IReadAccessor> sources)
public Divide(IReadAccessor... sources)
public Divide(Rounder decimals)
public Divide(Rounder decimals, IReadAccessor source)
public Divide(Rounder decimals, List<IReadAccessor> sources)
public Divide(Rounder decimals, IReadAccessor... sources)
public void compileValue(ICompilationContext ctxt, Class<?> expectedType) throws MRuleValidationException
compileValue
in class MArithmeticAccessor
MRuleValidationException
public BigDecimal evaluate(IExecutionContext ctxt, MArithmeticAccessor.InternalIterator values) throws MAccessorException
MArithmeticAccessor
evaluate
in class MArithmeticAccessor
MAccessorException
protected BigDecimal lastDivision(BigDecimal ret, BigDecimal bd)
protected boolean shouldFormatResult()
shouldFormatResult
in class MArithmeticAccessor