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