Class VirtDataConversions

java.lang.Object
io.nosqlbench.virtdata.api.bindings.VirtDataConversions

public class VirtDataConversions extends Object
  • Constructor Details

    • VirtDataConversions

      public VirtDataConversions()
  • Method Details

    • adaptFunctionArray

      public static <F, T> T[] adaptFunctionArray(F[] functionObjects, Class<T> functionType, Class<Object>... resultSignature)
    • adaptFunctionList

      public static <F, T> List<T> adaptFunctionList(F[] funcs, Class<T> functionType, Class<Object>... resultSignature)
    • adaptFunction

      public static <F, T> T adaptFunction(F func, Class<T> functionType, Class<?>... resultSignature)
      Adapt a functional object into a different type of functional object.
      Type Parameters:
      F - The generic type of function being converted from
      T - The generic type of function being converted to
      Parameters:
      func - The original function object.
      functionType - The type of the function you need
      resultSignature - 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 into
      offset - The offset within the group for the provided function
      funcs - A list of source objects to convert to functions.
      Returns: