T
-public interface Scalar<T>
Modifier and Type | Method and Description |
---|---|
static <T> Scalar<T> |
create()
Instantiate a new scalar.
|
static <T> Scalar<T> |
create(T t)
Instantiate a new scalar and initialize the scalar with the given value.
|
void |
decrement()
Decrement the scalar.
|
T |
get()
Get the value of the container.
|
void |
increment()
Increment the scalar.
|
void |
reduceAdd(T value)
Atomically update this scalar to the addition of the current value and the given value.
|
void |
reduceAnd(T value)
Atomically update this scalar to the conjunction of the current value and the given value.
|
void |
reduceMax(T value)
Atomically update this scalar to the maximum of the current value and the given value.
|
void |
reduceMin(T value)
Atomically update this scalar to the minimum of the current value and the given value.
|
void |
reduceMul(T value)
Atomically update this scalar to the multiplication of the current value and the given value.
|
void |
reduceOr(T value)
Atomically update this scalar to the disjunction of the current value and the given value.
|
void |
set(T t)
Set the value of the container.
|
static <T> Scalar<T> create()
T
-static <T> Scalar<T> create(T t)
T
-void decrement()
T get()
void increment()
void reduceAdd(T value)
value
-void reduceAnd(T value)
value
-void reduceMax(T value)
value
-void reduceMin(T value)
value
-void reduceMul(T value)
value
-void reduceOr(T value)
value
-void set(T t)
t
-