Class FieldsFromTuple

  • All Implemented Interfaces:
    Serializable, Extractor<org.apache.flink.api.java.tuple.Tuple,​double[]>

    @Internal
    public class FieldsFromTuple
    extends Object
    implements Extractor<org.apache.flink.api.java.tuple.Tuple,​double[]>
    Extracts one or more fields of the type Double from a tuple and puts them into a new double[].
    See Also:
    Serialized Form
    • Constructor Detail

      • FieldsFromTuple

        public FieldsFromTuple​(int... indexes)
        Extracts one or more fields of the type Double from a tuple and puts them into a new double[] (in the specified order).
        Parameters:
        indexes - The indexes of the fields to be extracted.
    • Method Detail

      • extract

        public double[] extract​(org.apache.flink.api.java.tuple.Tuple in)
        Description copied from interface: Extractor
        Extracts/Converts the given input to an object of the output type.
        Specified by:
        extract in interface Extractor<org.apache.flink.api.java.tuple.Tuple,​double[]>
        Parameters:
        in - the input data
        Returns:
        the extracted/converted data