@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()
Aggregator
getAggregate
in interface Aggregator<LongValue>
public void aggregate(LongValue element)
Aggregator
aggregate
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()
Aggregator
reset
in interface Aggregator<LongValue>
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.