Package jmri.jmrit.logixng.util.parser
Interface ExpressionNode
-
- All Known Subinterfaces:
ExpressionNodeWithParameter
- All Known Implementing Classes:
ExpressionNodeArithmeticOperator,ExpressionNodeArray,ExpressionNodeAssignmentOperator,ExpressionNodeBinaryOperator,ExpressionNodeBooleanOperator,ExpressionNodeComparingOperator,ExpressionNodeComplex,ExpressionNodeFalse,ExpressionNodeFloatingNumber,ExpressionNodeFunction,ExpressionNodeIdentifier,ExpressionNodeIncreaseDecreaseOperator,ExpressionNodeInstanceVariable,ExpressionNodeIntegerNumber,ExpressionNodeMap,ExpressionNodeMethod,ExpressionNodeString,ExpressionNodeTernaryOperator,ExpressionNodeTrue
public interface ExpressionNode
A parsed expression
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidassignValue(SymbolTable symbolTable, java.lang.Object value)Assign a value to this expressionjava.lang.Objectcalculate(SymbolTable symbolTable)Calculate the expressiondefault booleancanBeAssigned()Can this expression be assigned a value?java.lang.StringgetDefinitionString()Get a String that defines this expression node.
-
-
-
Method Detail
-
calculate
java.lang.Object calculate(SymbolTable symbolTable) throws JmriException
Calculate the expression- Parameters:
symbolTable- the symbol table- Returns:
- the result
- Throws:
JmriException- if an error occurs
-
canBeAssigned
default boolean canBeAssigned()
Can this expression be assigned a value?- Returns:
- true if it's possible to assign a value to this expression, false otherwise
-
assignValue
default void assignValue(SymbolTable symbolTable, java.lang.Object value) throws JmriException
Assign a value to this expression- Parameters:
symbolTable- the symbol tablevalue- the value to assign- Throws:
JmriException- if an error occurs
-
getDefinitionString
java.lang.String getDefinitionString()
Get a String that defines this expression node.- Returns:
- the string
-
-