Class AbstractDecimalAggregator
Abstract aggregator that processes IComparable values extracted from a set of entries in a IDictionary and returns a result in a form of a decimal value.
Inheritance
Inherited Members
Namespace: Tangosol.Util.Aggregator
Assembly: Coherence.dll
Syntax
public abstract class AbstractDecimalAggregator : AbstractAggregator, 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
AbstractDecimalAggregator()
Default constructor.
Declaration
public AbstractDecimalAggregator()
AbstractDecimalAggregator(string)
Construct a AbstractDecimalAggregator aggregator.
Declaration
public AbstractDecimalAggregator(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 Decimal. |
AbstractDecimalAggregator(IValueExtractor)
Construct a AbstractDecimalAggregator aggregator.
Declaration
public AbstractDecimalAggregator(IValueExtractor extractor)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The extractor that provides a value in the form of any .NET object that is Decimal. |
Fields
m_count
The count of processed entries.
Declaration
[NonSerialized]
protected int m_count
Field Value
Type | Description |
---|---|
int |
m_result
The running result value.
Declaration
[NonSerialized]
protected decimal m_result
Field Value
Type | Description |
---|---|
decimal |
Methods
EnsureDecimal(object)
Ensure the specified object is a Decimal value or convert it into a new Decimal object.
Declaration
public static decimal EnsureDecimal(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value | Object that should be ensured of Decimal. |
Returns
Type | Description |
---|---|
decimal | Decimal value. |
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.
Init(bool)
Initialize the aggregation result.
Declaration
protected override void Init(bool isFinal)
Parameters
Type | Name | Description |
---|---|---|
bool | isFinal | 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 initialized. |