Package com.hazelcast.jet.accumulator
Class DoubleAccumulator
- java.lang.Object
-
- com.hazelcast.jet.accumulator.DoubleAccumulator
-
public class DoubleAccumulator extends java.lang.Object
Accumulator of adouble
value.- Since:
- Jet 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
All Methods Instance Methods Concrete Methods 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(java.lang.Object o)
double
export()
Returns the current value.int
hashCode()
DoubleAccumulator
set(double value)
Sets the value as given.java.lang.String
toString()
-
-
-
Method Detail
-
set
public DoubleAccumulator set(double value)
Sets the value as given.
-
accumulate
public DoubleAccumulator accumulate(double v)
Adds the value to this objects' value.
-
combine
public DoubleAccumulator combine(DoubleAccumulator that)
Adds the value of the supplied accumulator to this one.
-
deduct
public DoubleAccumulator deduct(DoubleAccumulator that)
Subtracts the value of the supplied accumulator from this one.
-
export
public double export()
Returns the current value.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-