Class Expr
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_int.Expr
- All Implemented Interfaces:
java.util.function.LongToIntFunction
public class Expr
extends java.lang.Object
implements java.util.function.LongToIntFunction
Allow for the use of arbitrary expressions according to the
MVEL expression language.
Variables that have been set by a Save function are available
to be used in this function.
The variable name
cycle is reserved, and is always equal to
the current input value. This is not the same in every case as the
current cycle of an operation. It could be different if there
are preceding functions which modify the input value.-
Constructor Summary
Constructors Constructor Description Expr(java.lang.String expr) -
Method Summary
Modifier and Type Method Description intapplyAsInt(long value)
-
Constructor Details
-
Expr
public Expr(java.lang.String expr)
-
-
Method Details
-
applyAsInt
public int applyAsInt(long value)- Specified by:
applyAsIntin interfacejava.util.function.LongToIntFunction
-