Package jmri.jmrit.logixng.util.parser
Interface ExpressionNodeWithParameter
-
- All Superinterfaces:
ExpressionNode
- All Known Implementing Classes:
ExpressionNodeArray
,ExpressionNodeInstanceVariable
,ExpressionNodeMap
,ExpressionNodeMethod
public interface ExpressionNodeWithParameter extends ExpressionNode
An expression that takes a parameter. This interface are used for ExpressionNodeFunction
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
assignValue(java.lang.Object parameter, SymbolTable symbolTable, java.lang.Object value)
Assign a value to this expression from a parameter.java.lang.Object
calculate(java.lang.Object parameter, SymbolTable symbolTable)
Calculate the expression from a parameter.default java.lang.Object
calculate(SymbolTable symbolTable)
Calculate the expression-
Methods inherited from interface jmri.jmrit.logixng.util.parser.ExpressionNode
assignValue, canBeAssigned, getDefinitionString
-
-
-
-
Method Detail
-
calculate
default java.lang.Object calculate(SymbolTable symbolTable) throws JmriException
Calculate the expression- Specified by:
calculate
in interfaceExpressionNode
- Parameters:
symbolTable
- the symbol table- Returns:
- the result
- Throws:
JmriException
- if an error occurs
-
calculate
java.lang.Object calculate(java.lang.Object parameter, SymbolTable symbolTable) throws JmriException
Calculate the expression from a parameter.- Parameters:
parameter
- the parametersymbolTable
- the symbol table- Returns:
- the result
- Throws:
JmriException
- if an error occurs
-
assignValue
default void assignValue(java.lang.Object parameter, SymbolTable symbolTable, java.lang.Object value) throws JmriException
Assign a value to this expression from a parameter.- Parameters:
parameter
- the parametersymbolTable
- the symbol tablevalue
- the value to assign- Throws:
JmriException
- if an error occurs
-
-