Class ModelFarmUtils

java.lang.Object
io.deephaven.modelfarm.util.ModelFarmUtils

public class ModelFarmUtils extends Object
Utilities for building model farms.
  • Method Details

    • requireTable

      public static void requireTable(String tableName, Table t, String[] colNames, Class[] colTypes)
      Require a table to have specified columns of specified types.
      Parameters:
      tableName - table name
      t - table
      colNames - required column names
      colTypes - required column types
    • arrayString

      public static String[] arrayString(Object o)
      Interpret a table cell value as a string array.
      Parameters:
      o - table cell value.
      Returns:
      string array.
    • arrayInstant

      public static Instant[] arrayInstant(Object o)
      Interpret a table cell value as a date time array.
      Parameters:
      o - table cell value.
      Returns:
      date time array.
    • arrayFloat

      public static float[] arrayFloat(Object o)
      Interpret a table cell value as a float array.
      Parameters:
      o - table cell value.
      Returns:
      float array.
    • arrayDouble

      public static double[] arrayDouble(Object o)
      Interpret a table cell value as a double array.
      Parameters:
      o - table cell value.
      Returns:
      double array.
    • arrayInt

      public static int[] arrayInt(Object o)
      Interpret a table cell value as an int array.
      Parameters:
      o - table cell value.
      Returns:
      int array.
    • arrayLong

      public static long[] arrayLong(Object o)
      Interpret a table cell value as a long array.
      Parameters:
      o - table cell value.
      Returns:
      long array.
    • array2Double

      public static double[][] array2Double(Object o)
      Interpret a table cell value as a 2D double array.
      Parameters:
      o - table cell value.
      Returns:
      2D double array.