Class DecimalAverage
Calculates an average for values of any numberic type extracted from a set of entries in a IDictionary in a form of a decimal value.
Inherited Members
Namespace: Tangosol.Util.Aggregator
Assembly: Coherence.dll
Syntax
public class DecimalAverage : AbstractDecimalAggregator, IParallelAwareAggregator, IEntryAggregator, IPortableObject
Remarks
All the extracted objects will be treated as Decimal values.
If the set of entries is empty, a null
result is returned..
Constructors
DecimalAverage()
Default constructor.
Declaration
public DecimalAverage()
DecimalAverage(string)
Construct a DoubleAverage aggregator.
Declaration
public DecimalAverage(string member)
Parameters
Type | Name | Description |
---|---|---|
string | member | The name of the member that returns a value in the form of any .NET object that is a Decimal. |
DecimalAverage(IValueExtractor)
Construct a DecimalAverage aggregator.
Declaration
public DecimalAverage(IValueExtractor extractor)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The extractor that provides a value in the form of any .NET object that is a Decimal. |
Methods
FinalizeResult(bool)
Obtain the result of the aggregation.
Declaration
protected override object FinalizeResult(bool isFinal)
Parameters
Type | Name | Description |
---|---|---|
bool | isFinal | 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. |
Returns
Type | Description |
---|---|
object | The result of the aggregation process. |
Overrides
Remarks
If the isFinal
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.
Process(object, bool)
Incorporate one aggregatable value into the result.
Declaration
protected override void Process(object o, bool isFinal)
Parameters
Type | Name | Description |
---|---|---|
object | o | The value to incorporate into the aggregated result. |
bool | isFinal | true to indicate that the given object is a partial result returned by a parallel aggregator. |
Overrides
Remarks
If the isFinal
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
IInvocableCacheEntry.