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.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.
-
-
-
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.
-
-