|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.util.aggregator.AbstractAggregator
com.tangosol.util.aggregator.AbstractBigDecimalAggregator
com.tangosol.util.aggregator.BigDecimalAverage
public class BigDecimalAverage
Calculates an average for values of any numberic type extracted from a set
of entries in a Map in a form of a BigDecimal
value. All
the extracted objects will be treated as BigDecimal
,
BigInteger
or Java double values.
If the set of entries is empty, a null result is returned.
Field Summary |
---|
Fields inherited from class com.tangosol.util.aggregator.AbstractBigDecimalAggregator |
---|
m_count, m_decResult |
Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator |
---|
m_fParallel |
Constructor Summary | |
---|---|
BigDecimalAverage()
Default constructor (necessary for the ExternalizableLite interface). |
|
BigDecimalAverage(String sMethod)
Construct an BigDecimalAverage object. |
|
BigDecimalAverage(ValueExtractor extractor)
Construct a BigDecimalAverage aggregator. |
Method Summary | |
---|---|
protected Object |
finalizeResult(boolean fFinal)
Obtain the result of the aggregation. If the fFinal parameter is true, the returned object must be the final result of the aggregation; otherwise, the returned object will be treated as a partial result that should be incorporated into the final result. |
protected void |
process(Object o,
boolean fFinal)
Incorporate one aggregatable value into the result. |
Methods inherited from class com.tangosol.util.aggregator.AbstractBigDecimalAggregator |
---|
ensureBigDecimal, init |
Methods inherited from class com.tangosol.util.aggregator.AbstractAggregator |
---|
aggregate, aggregateResults, equals, getParallelAggregator, getValueExtractor, hashCode, readExternal, readExternal, toString, writeExternal, writeExternal |
Methods inherited from class com.tangosol.util.BitHelper |
---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, toBitString, toBitString, toBitString |
Constructor Detail |
---|
public BigDecimalAverage()
public BigDecimalAverage(ValueExtractor extractor)
extractor
- the extractor that provides a value in the form of
any Java object that is a Number
public BigDecimalAverage(String sMethod)
sMethod
- the name of the method that returns a value in the form
of any Java object that is a Number
Method Detail |
---|
protected void process(Object o, boolean fFinal)
InvocableMap.Entry
.
process
in class AbstractAggregator
o
- the value to incorporate into the aggregated resultfFinal
- true to indicate that the given object is a partial
result returned by a parallel aggregatorprotected Object finalizeResult(boolean fFinal)
finalizeResult
in class AbstractBigDecimalAggregator
fFinal
- true to indicate that the final result of the
aggregation process should be returned; this will only
be false if a parallel approach is being used
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |