|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.BitHelper
com.tangosol.util.ExternalizableHelper
com.tangosol.util.aggregator.AbstractAggregator
com.tangosol.util.aggregator.AbstractDoubleAggregator
com.tangosol.util.aggregator.DoubleAverage
public class DoubleAverage
Calculates an average for values of any numberic type extracted from a set of entries in a Map. All the extracted Number objects will be treated as 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.AbstractDoubleAggregator |
---|
m_count, m_dflResult |
Fields inherited from class com.tangosol.util.aggregator.AbstractAggregator |
---|
m_fParallel |
Constructor Summary | |
---|---|
DoubleAverage() Default constructor (necessary for the ExternalizableLite interface). |
|
DoubleAverage(java.lang.String sMethod) Construct an DoubleAverage object. |
|
DoubleAverage(ValueExtractor extractor) Construct a DoubleAverage aggregator. |
Method Summary | |
---|---|
protected java.lang.Object |
finalizeResult(boolean fFinal) Obtain the result of the aggregation. |
protected void |
init(boolean fFinal) Initialize the aggregation result. |
protected void |
process(java.lang.Object o, boolean fFinal) Incorporate one aggregatable value into the result. |
Methods inherited from class com.tangosol.util.aggregator.AbstractAggregator |
---|
aggregate, aggregateResults, equals, getParallelAggregator, getValueExtractor, hashCode, processEntry, readExternal, readExternal, toString, writeExternal, writeExternal |
Methods inherited from class com.tangosol.util.BitHelper |
---|
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString |
Constructor Detail |
---|
public DoubleAverage()
public DoubleAverage(ValueExtractor extractor)
extractor
- the extractor that provides a value in the form of any Java object that is a Number
public DoubleAverage(java.lang.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 init(boolean fFinal)
init
in class AbstractDoubleAggregator
fFinal
- true is passed if the aggregation process that is being initialized must produce a final aggregation result; this will only be false if a parallel approach is being used and the initial (partial) aggregation process is being initializedprotected void process(java.lang.Object o, boolean fFinal)
If the fFinal parameter is true, the given object is a partial result (returned by an individual parallel aggregator) that should be incorporated into the final result; otherwise, the object is a value extracted from an 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 java.lang.Object finalizeResult(boolean fFinal)
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.
finalizeResult
in class AbstractDoubleAggregator
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
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |