Package org.zkoss.pivot.impl.calc
Class SumCountContext
java.lang.Object
org.zkoss.pivot.impl.calc.SumCountContext
- All Implemented Interfaces:
Context<SumCountContext>
The most commonly used context including SUM, COUNT and COUNT_NUMBER aggregation.
- Author:
- simonpai
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected Numbers.MixedTypedNumberstatic final ContextFactory<SumCountContext> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an item into the aggregation.intgetCount()Retrieve COUNT, which includes the count of non-number objects.intRetrieve NUMBER COUNT, which excludes the count of non-number objects.getSum()Retrieve SUM.voidmerge(SumCountContext ctx) Merge from another context of the same type.
-
Field Details
-
_sum
-
_numCount
protected int _numCount -
_count
protected int _count -
FACTORY
-
-
Constructor Details
-
SumCountContext
public SumCountContext()
-
-
Method Details
-
add
Description copied from interface:ContextAdd an item into the aggregation.- Specified by:
addin interfaceContext<SumCountContext>
-
merge
Description copied from interface:ContextMerge from another context of the same type.- Specified by:
mergein interfaceContext<SumCountContext>
-
getCount
public int getCount()Retrieve COUNT, which includes the count of non-number objects. -
getNumberCount
public int getNumberCount()Retrieve NUMBER COUNT, which excludes the count of non-number objects. -
getSum
Retrieve SUM.
-