Package jmri.jmrit.logixng.util.parser
Class ExpressionNodeIdentifier
java.lang.Object
jmri.jmrit.logixng.util.parser.ExpressionNodeIdentifier
- All Implemented Interfaces:
ExpressionNode
A parsed expression
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassignValue(SymbolTable symbolTable, Object value) Assign a value to this expressioncalculate(SymbolTable symbolTable) Calculate the expressionbooleanCan this expression be assigned a value?Get a String that defines this expression node.
-
Constructor Details
-
ExpressionNodeIdentifier
public ExpressionNodeIdentifier(Token token, Map<String, Variable> variables) throws IdentifierNotExistsException- Throws:
IdentifierNotExistsException
-
-
Method Details
-
getIdentifier
-
calculate
Description copied from interface:ExpressionNodeCalculate the expression- Specified by:
calculatein interfaceExpressionNode- Parameters:
symbolTable- the symbol table- Returns:
- the result
- Throws:
JmriException- if an error occurs
-
canBeAssigned
Can this expression be assigned a value?- Specified by:
canBeAssignedin interfaceExpressionNode- Returns:
- true if it's possible to assign a value to this expression, false otherwise
-
assignValue
Assign a value to this expression- Specified by:
assignValuein interfaceExpressionNode- Parameters:
symbolTable- the symbol tablevalue- the value to assign- Throws:
JmriException- if an error occurs
-
getDefinitionString
Get a String that defines this expression node.- Specified by:
getDefinitionStringin interfaceExpressionNode- Returns:
- the string
-