Package oracle.pgx.algorithm
Interface Scalar<T>
-
- Type Parameters:
T-
public interface Scalar<T>A container for a scalar value.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method 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.voiddecrement()Decrement the scalar.Tget()Get the value of the container.voidincrement()Increment the scalar.voidreduceAdd(T value)Atomically update this scalar to the addition of the current value and the given value.voidreduceAnd(T value)Atomically update this scalar to the conjunction of the current value and the given value.voidreduceMax(T value)Atomically update this scalar to the maximum of the current value and the given value.voidreduceMin(T value)Atomically update this scalar to the minimum of the current value and the given value.voidreduceMul(T value)Atomically update this scalar to the multiplication of the current value and the given value.voidreduceOr(T value)Atomically update this scalar to the disjunction of the current value and the given value.voidset(T t)Set the value of the container.
-
-
-
Method Detail
-
create
static <T> Scalar<T> create()
Instantiate a new scalar.- Type Parameters:
T-- Returns:
-
create
static <T> Scalar<T> create(T t)
Instantiate a new scalar and initialize the scalar with the given value.- Type Parameters:
T-- Returns:
-
set
void set(T t)
Set the value of the container.- Parameters:
t-
-
get
T get()
Get the value of the container.- Returns:
-
reduceAdd
void reduceAdd(T value)
Atomically update this scalar to the addition of the current value and the given value.- Parameters:
value-
-
reduceMul
void reduceMul(T value)
Atomically update this scalar to the multiplication of the current value and the given value.- Parameters:
value-
-
reduceOr
void reduceOr(T value)
Atomically update this scalar to the disjunction of the current value and the given value.- Parameters:
value-
-
reduceAnd
void reduceAnd(T value)
Atomically update this scalar to the conjunction of the current value and the given value.- Parameters:
value-
-
reduceMax
void reduceMax(T value)
Atomically update this scalar to the maximum of the current value and the given value.- Parameters:
value-
-
reduceMin
void reduceMin(T value)
Atomically update this scalar to the minimum of the current value and the given value.- Parameters:
value-
-
increment
void increment()
Increment the scalar.
-
decrement
void decrement()
Decrement the scalar.
-
-