Package jmri.jmrit.logixng.util.parser
Class ExpressionNodeInstanceVariable
java.lang.Object
jmri.jmrit.logixng.util.parser.ExpressionNodeInstanceVariable
- All Implemented Interfaces:
ExpressionNode,ExpressionNodeWithParameter
A parsed expression
-
Constructor Summary
ConstructorsConstructorDescriptionExpressionNodeInstanceVariable(String fieldName, Map<String, Variable> variables) -
Method Summary
Modifier and TypeMethodDescriptionvoidassignValue(Object parameter, SymbolTable symbolTable, Object value) Assign a value to this expression from a parameter.calculate(Object parameter, SymbolTable symbolTable) Calculate the expression from a parameter.booleanCan this expression be assigned a value?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, waitMethods inherited from interface jmri.jmrit.logixng.util.parser.ExpressionNode
assignValueMethods inherited from interface jmri.jmrit.logixng.util.parser.ExpressionNodeWithParameter
calculate
-
Constructor Details
-
ExpressionNodeInstanceVariable
public ExpressionNodeInstanceVariable(String fieldName, Map<String, Variable> variables) throws IdentifierNotExistsException- Throws:
IdentifierNotExistsException
-
-
Method Details
-
calculate
Description copied from interface:ExpressionNodeWithParameterCalculate the expression from a parameter.- Specified by:
calculatein interfaceExpressionNodeWithParameter- Parameters:
parameter- the parametersymbolTable- 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
public void assignValue(Object parameter, SymbolTable symbolTable, Object value) throws JmriException Assign a value to this expression from a parameter.- Specified by:
assignValuein interfaceExpressionNodeWithParameter- Parameters:
parameter- the parametersymbolTable- 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
-