Package com.illumon.modelfarm.util
Class ModelFarmUtils
java.lang.Object
com.illumon.modelfarm.util.ModelFarmUtils
public class ModelFarmUtils extends Object
Utilities for building model farms.
-
Method Summary
Modifier and Type Method Description static double[][]
array2Double(Object o)
Interpret a table cell value as a 2D double array.static DBDateTime[]
arrayDBDateTime(Object o)
Interpret a table cell value as a date time array.static double[]
arrayDouble(Object o)
Interpret a table cell value as a double array.static float[]
arrayFloat(Object o)
Interpret a table cell value as a float array.static int[]
arrayInt(Object o)
Interpret a table cell value as an int array.static long[]
arrayLong(Object o)
Interpret a table cell value as a long array.static String[]
arrayString(Object o)
Interpret a table cell value as a string array.static void
requireTable(String tableName, Table t, String[] colNames, Class[] colTypes)
Require a table to have specified columns of specified types.
-
Method Details
-
requireTable
Require a table to have specified columns of specified types.- Parameters:
tableName
- table namet
- tablecolNames
- required column namescolTypes
- required column types
-
arrayString
Interpret a table cell value as a string array.- Parameters:
o
- table cell value.- Returns:
- string array.
-
arrayDBDateTime
Interpret a table cell value as a date time array.- Parameters:
o
- table cell value.- Returns:
- date time array.
-
arrayFloat
Interpret a table cell value as a float array.- Parameters:
o
- table cell value.- Returns:
- float array.
-
arrayDouble
Interpret a table cell value as a double array.- Parameters:
o
- table cell value.- Returns:
- double array.
-
arrayInt
Interpret a table cell value as an int array.- Parameters:
o
- table cell value.- Returns:
- int array.
-
arrayLong
Interpret a table cell value as a long array.- Parameters:
o
- table cell value.- Returns:
- long array.
-
array2Double
Interpret a table cell value as a 2D double array.- Parameters:
o
- table cell value.- Returns:
- 2D double array.
-