@PersistantProperty(property="coefficientsSource") @PersistantProperty(property="coefficientsValues") @PersistantProperty(property="coefficientsProperty") public class Average extends Divide
MArithmeticAccessor.InternalIterator
IReadAccessor.Standalone
Modifier and Type | Field and Description |
---|---|
static String |
AVERAGE_ID |
Constructor and Description |
---|
Average() |
Average(IReadAccessor... sources) |
Average(IReadAccessor source) |
Average(List<IReadAccessor> sources) |
Average(Rounder decimals) |
Average(Rounder decimals,
IReadAccessor... sources) |
Average(Rounder decimals,
IReadAccessor source) |
Average(Rounder decimals,
List<IReadAccessor> sources) |
Modifier and Type | Method and Description |
---|---|
Average |
clone()
Clones the Addon.
|
void |
compileValue(ICompilationContext ctxt,
Class<?> expectedType)
Compiles coefficient(s) accessor(s).
|
boolean |
equals(Object obj) |
BigDecimal |
evaluate(IExecutionContext ctxt,
MArithmeticAccessor.InternalIterator values)
Performs the arithmetic operation.
|
IReadAccessor |
getCoefficientsProperty() |
IReadAccessor |
getCoefficientsSource() |
List<IReadAccessor> |
getCoefficientsValues() |
CostInfo |
getEstimatedReadCost(ICompilationContext ctxt)
Estimates the reading complexity, to allow callers to optimize calls.
|
String |
getImplementationId()
Unique addon implementation ID.
|
int |
hashCode() |
void |
setCoefficientsProperty(IReadAccessor coefficient) |
void |
setCoefficientsSource(IReadAccessor coefficients) |
void |
setCoefficientsValues(List<IReadAccessor> coefficientsValues) |
void |
toString(OuterWithLevel outer)
Method used to send String representation of the current object to the
OuterWithLevel . |
lastDivision, shouldFormatResult
compileCollection, format, getCondition, getDecimals, getGenericCollectionType, getInternalExpectedType, getMaxDecimals, getProperty, getSource, getType, getValues, internalGet, isCacheUsed, isShouldIterate, setCondition, setDecimals, setProperty, setSource, setValues
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 AVERAGE_ID
public Average()
public Average(IReadAccessor source)
public Average(List<IReadAccessor> sources)
public Average(IReadAccessor... sources)
public Average(Rounder decimals)
public Average(Rounder decimals, IReadAccessor... sources)
public Average(Rounder decimals, IReadAccessor source)
public Average(Rounder decimals, List<IReadAccessor> sources)
public void compileValue(ICompilationContext ctxt, Class<?> expectedType) throws MRuleValidationException
compileValue
in class Divide
MRuleValidationException
public CostInfo getEstimatedReadCost(ICompilationContext ctxt) throws MRuleValidationException
IReadAccessor
getEstimatedReadCost
in interface IReadAccessor
getEstimatedReadCost
in class MArithmeticAccessor
ctxt
- Compilation context.MRuleValidationException
- if validation problem detected.public BigDecimal evaluate(IExecutionContext ctxt, MArithmeticAccessor.InternalIterator values) throws MAccessorException
MArithmeticAccessor
evaluate
in class Divide
MAccessorException
public String getImplementationId()
IAddon
getImplementationId
in interface IAddon
getImplementationId
in class Divide
public void toString(OuterWithLevel outer) throws IOException
Outable
OuterWithLevel
.toString
in interface Outable
toString
in class MArithmeticAccessor
IOException
public int hashCode()
hashCode
in class MArithmeticAccessor
public boolean equals(Object obj)
equals
in class MArithmeticAccessor
public Average clone()
IAddon
clone
in interface IAccessor
clone
in interface IReadAccessor
clone
in interface IAddon
clone
in interface IMRulesObject
clone
in class MArithmeticAccessor
public IReadAccessor getCoefficientsProperty()
public void setCoefficientsProperty(IReadAccessor coefficient)
public IReadAccessor getCoefficientsSource()
public void setCoefficientsSource(IReadAccessor coefficients)
public List<IReadAccessor> getCoefficientsValues()
public void setCoefficientsValues(List<IReadAccessor> coefficientsValues)