Class ColFunction

  • All Implemented Interfaces:
    JepFunction, org.nfunk.jep.function.PostfixMathCommandI

    public class ColFunction
    extends Object
    implements JepFunction
    Adds a col() function to Jep. The col function is used with the FlatFileParser to get the value of a data column. The argument to the col function is either the column name or index (0-based). Use the FlatFileParser.getMapper(String) with an argument starting with an equal sign to create a mapper that uses Jep.
    FlatFileParser ffp = ...
    Mapper diameterMapper = ffp.getMapper("=col('Radius') * 2");
    while (ffp.hasMoreData())
    {
            Data data = ffp.nextData();
            float diameter = diameterMapper.getFloat(data);
    }
    
    Version:
    2.0
    Author:
    nicklas
    Last modified
    $Date: 2019-03-21 13:37:48 +0100 (tors, 21 mars 2019) $