Package com.hazelcast.jet.accumulator
Class DoubleAccumulator
java.lang.Object
com.hazelcast.jet.accumulator.DoubleAccumulator
Accumulator of a
double
value.- Since:
- Jet 3.0
-
Constructor Summary
ConstructorDescriptionCreates a new instance withvalue == 0
.DoubleAccumulator
(double value) Creates a new instance with the specified value. -
Method Summary
Modifier and TypeMethodDescriptionaccumulate
(double v) Adds the value to this objects' value.combine
(DoubleAccumulator that) Adds the value of the supplied accumulator to this one.deduct
(DoubleAccumulator that) Subtracts the value of the supplied accumulator from this one.boolean
double
export()
Returns the current value.int
hashCode()
set
(double value) Sets the value as given.toString()
-
Constructor Details
-
DoubleAccumulator
public DoubleAccumulator()Creates a new instance withvalue == 0
. -
DoubleAccumulator
public DoubleAccumulator(double value) Creates a new instance with the specified value.
-
-
Method Details
-
set
Sets the value as given. -
accumulate
Adds the value to this objects' value. -
combine
Adds the value of the supplied accumulator to this one. -
deduct
Subtracts the value of the supplied accumulator from this one. -
export
public double export()Returns the current value. -
equals
-
hashCode
public int hashCode() -
toString
-