Package jmri.jmrit.logixng.util.parser
Class ExpressionNodeMethod
- java.lang.Object
-
- jmri.jmrit.logixng.util.parser.ExpressionNodeMethod
-
- All Implemented Interfaces:
ExpressionNode
,ExpressionNodeWithParameter
public class ExpressionNodeMethod extends java.lang.Object implements ExpressionNodeWithParameter
A parsed expression
-
-
Constructor Summary
Constructors Constructor Description ExpressionNodeMethod(java.lang.String method, java.util.Map<java.lang.String,Variable> variables, java.util.List<ExpressionNode> parameterList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
calculate(java.lang.Object parameter, SymbolTable symbolTable)
Calculate the expression from a parameter.java.lang.String
getDefinitionString()
Get a String that defines this expression node.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrit.logixng.util.parser.ExpressionNode
assignValue, canBeAssigned
-
Methods inherited from interface jmri.jmrit.logixng.util.parser.ExpressionNodeWithParameter
assignValue, calculate
-
-
-
-
Constructor Detail
-
ExpressionNodeMethod
public ExpressionNodeMethod(java.lang.String method, java.util.Map<java.lang.String,Variable> variables, java.util.List<ExpressionNode> parameterList) throws FunctionNotExistsException
- Throws:
FunctionNotExistsException
-
-
Method Detail
-
calculate
public java.lang.Object calculate(java.lang.Object parameter, SymbolTable symbolTable) throws JmriException
Description copied from interface:ExpressionNodeWithParameter
Calculate the expression from a parameter.- Specified by:
calculate
in interfaceExpressionNodeWithParameter
- Parameters:
parameter
- the parametersymbolTable
- the symbol table- Returns:
- the result
- Throws:
JmriException
- if an error occurs
-
getDefinitionString
public java.lang.String getDefinitionString()
Get a String that defines this expression node.- Specified by:
getDefinitionString
in interfaceExpressionNode
- Returns:
- the string
-
-