Class MlParserUtils

java.lang.Object
org.elasticsearch.xpack.core.ml.utils.MlParserUtils

public final class MlParserUtils extends Object
  • Method Details

    • parseArrayOfArrays

      public static <T> List<List<T>> parseArrayOfArrays(String fieldName, org.elasticsearch.core.CheckedFunction<org.elasticsearch.xcontent.XContentParser,T,IOException> valueParser, org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Parses an array of arrays of the given type
      Type Parameters:
      T - the type of the values of the inner array
      Parameters:
      fieldName - the field name
      valueParser - the parser to use for the inner array values
      parser - the outer parser
      Returns:
      a list of lists representing the array of arrays
      Throws:
      IOException - an exception if parsing fails
    • parse3DArrayOfDoubles

      public static double[][][] parse3DArrayOfDoubles(String fieldName, org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Parses a 3 dimensional array of doubles.
      Parameters:
      fieldName - the field name
      parser - the outer parser
      Returns:
      The 3D array of doubles
      Throws:
      IOException - If parsing fails