Class VirtDataFunctions

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

public class VirtDataFunctions extends Object
  • Constructor Details

    • VirtDataFunctions

      public VirtDataFunctions()
  • Method Details

    • adapt

      public static <F> F adapt(Object func, Class<F> type, Class<?> output, boolean truncate)
      Adapt a functional object into a different type of functional object.
      Type Parameters:
      F - The type of function object needed.
      Parameters:
      func - The original function object.
      type - The type of function object needed.
      output - The output type required for the adapted function.
      truncate - Whether to throw an exception on any narrowing conversion. If this is set to false, then basic roll-over logic is applied on narrowing conversions.
      Returns:
      An instance of F
    • adaptList

      public static <F> List<F> adaptList(Object[] funcs, Class<F> type, Class<?> output, boolean truncate)
    • adaptLongToIntFunction

      protected static LongToIntFunction adaptLongToIntFunction(Object func, Class<?> output)