public class LongAccumulator extends Object
long
value.Constructor and Description |
---|
LongAccumulator()
Creates a new instance with
value == 0 . |
LongAccumulator(long value)
Creates a new instance with the specified value.
|
Modifier and Type | Method and Description |
---|---|
LongAccumulator |
add(long value)
Adds the supplied value to this accumulator, throwing an exception
in the case of integer overflow.
|
LongAccumulator |
add(LongAccumulator that)
Adds the value of the supplied accumulator to this accumulator, throwing
an exception in the case of integer overflow.
|
LongAccumulator |
addAllowingOverflow(long value)
Adds the supplied value to this accumulator, allowing integer overflow.
|
LongAccumulator |
addAllowingOverflow(LongAccumulator that)
Adds the value of the supplied accumulator to this accumulator, allowing
integer overflow.
|
boolean |
equals(Object o) |
long |
get()
Returns the current value.
|
int |
hashCode() |
LongAccumulator |
set(long value)
Sets the value as given.
|
LongAccumulator |
subtract(long value)
Subtracts the supplied value from this accumulator, throwing an
exception in the case of integer overflow.
|
LongAccumulator |
subtract(LongAccumulator that)
Subtracts the value of the supplied accumulator from this one,
throwing an exception in the case of integer overflow.
|
LongAccumulator |
subtractAllowingOverflow(long value)
Subtracts the supplied value from this accumulator, allowing integer
overflow.
|
LongAccumulator |
subtractAllowingOverflow(LongAccumulator that)
Subtracts the value of the supplied accumulator from this one, allowing
integer overflow.
|
String |
toString() |
public LongAccumulator()
value == 0
.public LongAccumulator(long value)
public long get()
public LongAccumulator set(long value)
public LongAccumulator add(long value)
public LongAccumulator add(LongAccumulator that)
public LongAccumulator subtract(long value)
public LongAccumulator subtract(LongAccumulator that)
public LongAccumulator addAllowingOverflow(long value)
public LongAccumulator addAllowingOverflow(LongAccumulator that)
public LongAccumulator subtractAllowingOverflow(long value)
public LongAccumulator subtractAllowingOverflow(LongAccumulator that)
Copyright © 2023 Hazelcast, Inc.. All rights reserved.