Package com.hazelcast.jet.accumulator
Class DoubleAccumulator
java.lang.Object
com.hazelcast.jet.accumulator.DoubleAccumulator
public class DoubleAccumulator extends Object
Accumulator of a
double
value.- Since:
- 3.0
-
Constructor Summary
Constructors Constructor Description DoubleAccumulator()
Creates a new instance withvalue == 0
.DoubleAccumulator(double value)
Creates a new instance with the specified value. -
Method Summary
Modifier and Type Method Description DoubleAccumulator
accumulate(double v)
Adds the value to this objects' value.DoubleAccumulator
combine(DoubleAccumulator that)
Adds the value of the supplied accumulator to this one.DoubleAccumulator
deduct(DoubleAccumulator that)
Subtracts the value of the supplied accumulator from this one.boolean
equals(Object o)
double
export()
Returns the current value.int
hashCode()
DoubleAccumulator
set(double value)
Sets the value as given.String
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
-