Class VirtDataConversions
java.lang.Object
io.nosqlbench.virtdata.api.bindings.VirtDataConversions
public class VirtDataConversions
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description VirtDataConversions() -
Method Summary
Modifier and Type Method Description static <F, T> TadaptFunction(F func, java.lang.Class<T> functionType, java.lang.Class<?>... resultSignature)Adapt a functional object into a different type of functional object.static <F, T> java.util.List<T>adaptFunctionList(F[] funcs, java.lang.Class<T> functionType, java.lang.Class<java.lang.Object>... resultSignature)static <T> java.util.List<T>getFunctions(int mod, int offset, java.lang.Class<? extends T> functionType, java.lang.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
-
adaptFunctionList
public static <F, T> java.util.List<T> adaptFunctionList(F[] funcs, java.lang.Class<T> functionType, java.lang.Class<java.lang.Object>... resultSignature) -
adaptFunction
public static <F, T> T adaptFunction(F func, java.lang.Class<T> functionType, java.lang.Class<?>... resultSignature)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> java.util.List<T> getFunctions(int mod, int offset, java.lang.Class<? extends T> functionType, java.lang.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:
-