Class DataNoFunction

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

    public class DataNoFunction
    extends Object
    implements JepFunction
    Adds a dataNo() function to Jep. The dataNo() function is used with the FlatFileParser to get the current data line number within a section. Use the FlatFileParser.getMapper(String) with an argument starting with an equal sign to create a mapper that uses Jep.
    FlatFileParser ffp = ...
    Mapper dataNoMapper = ffp.getMapper("=dataNo()");
    while (ffp.hasMoreData())
    {
            Data data = ffp.nextData();
            int lineNumber = dataNoMapper.getInt(data);
    }
    
    Version:
    2.4
    Author:
    nicklas
    Last modified
    $Date: 2015-04-20 11:08:18 +0200 (må, 20 apr 2015) $