public class SumCountContext extends Object implements Context<SumCountContext>
Modifier and Type | Field and Description |
---|---|
protected int |
_count |
protected int |
_numCount |
protected Numbers.MixedTypedNumber |
_sum |
static ContextFactory<SumCountContext> |
FACTORY |
Constructor and Description |
---|
SumCountContext() |
Modifier and Type | Method and Description |
---|---|
void |
add(Object item)
Add an item into the aggregation.
|
int |
getCount()
Retrieve COUNT, which includes the count of non-number objects.
|
int |
getNumberCount()
Retrieve NUMBER COUNT, which excludes the count of non-number objects.
|
Number |
getSum()
Retrieve SUM.
|
void |
merge(SumCountContext ctx)
Merge from another context of the same type.
|
protected Numbers.MixedTypedNumber _sum
protected int _numCount
protected int _count
public static final ContextFactory<SumCountContext> FACTORY
public void add(Object item)
Context
add
in interface Context<SumCountContext>
public void merge(SumCountContext ctx)
Context
merge
in interface Context<SumCountContext>
public int getCount()
public int getNumberCount()
public Number getSum()
Copyright © 2017. All rights reserved.