Class VirtDataConversions
java.lang.Object
io.nosqlbench.virtdata.api.bindings.VirtDataConversions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <F,T> T adaptFunction(F func, Class<T> functionType, Class<?>... resultSignature) Adapt a functional object into a different type of functional object.static <F,T> T[] adaptFunctionArray(F[] functionObjects, Class<T> functionType, Class<Object>... resultSignature) static <F,T> List <T> adaptFunctionList(F[] funcs, Class<T> functionType, Class<Object>... resultSignature) static <T> List<T> getFunctions(int mod, int offset, Class<? extends T> functionType, Object... funcs) Slice the incoming object list into a set of functions, based on a grouping interval and an offset.
-
Constructor Details
-
VirtDataConversions
public VirtDataConversions()
-
-
Method Details
-
adaptFunctionArray
-
adaptFunctionList
-
adaptFunction
Adapt a functional object into a different type of functional object.- Type Parameters:
F- The generic type of function being converted fromT- The generic type of function being converted to- Parameters:
func- The original function object.functionType- The type of the function you needresultSignature- The signature of all output types, linearized for use after type-erasure.- Returns:
- An instance of T
-
getFunctions
public static <T> List<T> getFunctions(int mod, int offset, Class<? extends T> functionType, Object... funcs) Slice the incoming object list into a set of functions, based on a grouping interval and an offset.- Parameters:
mod- The grouping interval, or modulo to slice the function groups intooffset- The offset within the group for the provided functionfuncs- A list of source objects to convert to functions.- Returns:
-