public class PositionFunction extends java.lang.Object implements JepExpressionFunction
pos
function to a
JEP expression parser. The function will look up position.
For example:
pos()
To be able to use this function it must be registered with the JEP
parser. This function can only be used to convert a JEP expression to
a Query API Expression
. It doesn't support dynamic evalution.
Jep
,
BioAssaySetUtil.createJepExpression(DbControl, String, DynamicQuery)
Constructor and Description |
---|
PositionFunction() |
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)
Can't be changed.
|
Expression |
toExpression(Node node)
Use the
Dynamic.column(VirtualColumn) method to create an
expression referencing a position. |
public java.lang.String getFunctionName()
JepFunction
JEP
parser.getFunctionName
in interface JepFunction
JEP.addFunction(String, PostfixMathCommandI)
public Expression toExpression(Node node)
Dynamic.column(VirtualColumn)
method to create an
expression referencing a position.toExpression
in interface JepExpressionFunction
node
- The node representing this functionExpression
objectpublic 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