@PublicEvolving public class LongSumAggregator extends Object implements Aggregator<LongValue>
Aggregator that sums up long values.| Constructor and Description |
|---|
LongSumAggregator() |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(long value)
Adds the given value to the current aggregate.
|
void |
aggregate(LongValue element)
Aggregates the given element.
|
LongValue |
getAggregate()
Gets the aggregator's current aggregate.
|
void |
reset()
Resets the internal state of the aggregator.
|
public LongValue getAggregate()
AggregatorgetAggregate in interface Aggregator<LongValue>public void aggregate(LongValue element)
Aggregatoraggregate in interface Aggregator<LongValue>element - The element to aggregate.public void aggregate(long value)
value - The value to add to the aggregate.public void reset()
Aggregatorreset in interface Aggregator<LongValue>Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.