public class DataNoFunction extends java.lang.Object implements JepFunction
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); }
Modifier and Type | Field and Description |
---|---|
private FlatFileParser.Data |
data |
Constructor and Description |
---|
DataNoFunction() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkNumberOfParameters(int n) |
java.lang.String |
getFunctionName()
Get the name of this function.
|
int |
getNumberOfParameters() |
void |
run(java.util.Stack stack) |
void |
setCurNumberOfParameters(int n) |
void |
setData(FlatFileParser.Data data) |
private FlatFileParser.Data data
public java.lang.String getFunctionName()
JepFunction
JEP
parser.getFunctionName
in interface JepFunction
JEP.addFunction(String, PostfixMathCommandI)
public int getNumberOfParameters()
getNumberOfParameters
in interface org.nfunk.jep.function.PostfixMathCommandI
public void setCurNumberOfParameters(int n)
setCurNumberOfParameters
in interface org.nfunk.jep.function.PostfixMathCommandI
public boolean checkNumberOfParameters(int n)
checkNumberOfParameters
in interface org.nfunk.jep.function.PostfixMathCommandI
public void run(java.util.Stack stack) throws ParseException
run
in interface org.nfunk.jep.function.PostfixMathCommandI
ParseException
public void setData(FlatFileParser.Data data)