@PublicEvolving public class DoubleCounter extends Object implements SimpleAccumulator<Double>
double
values.Constructor and Description |
---|
DoubleCounter() |
DoubleCounter(double value) |
Modifier and Type | Method and Description |
---|---|
void |
add(double value) |
void |
add(Double value)
Consider using
add(double) instead for primitive double values |
DoubleCounter |
clone()
Duplicates the accumulator.
|
Double |
getLocalValue() |
double |
getLocalValuePrimitive() |
void |
merge(Accumulator<Double,Double> other)
Used by system internally to merge the collected parts of an accumulator
at the end of the job.
|
void |
resetLocal()
Reset the local value.
|
String |
toString() |
public DoubleCounter()
public DoubleCounter(double value)
public void add(Double value)
add(double)
instead for primitive double valuesadd
in interface Accumulator<Double,Double>
value
- The value to add to the accumulator objectpublic Double getLocalValue()
getLocalValue
in interface Accumulator<Double,Double>
public void merge(Accumulator<Double,Double> other)
Accumulator
merge
in interface Accumulator<Double,Double>
other
- Reference to accumulator to merge in.public void resetLocal()
Accumulator
resetLocal
in interface Accumulator<Double,Double>
public DoubleCounter clone()
Accumulator
CloneNotSupportedException
public void add(double value)
public double getLocalValuePrimitive()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.