A visitor that sets a variable with a specific name to a given value. More...


Public Member Functions | |
| SetVariable (String name, double value) | |
| Construct the visitor with the name and the value of the variable to set. | |
| void | visit (VariableExpressionNode node) |
| Checks the nodes name against the name to set and sets the value if the two strings match. | |
| void | visit (ConstantExpressionNode node) |
| Do nothing. | |
| void | visit (AdditionExpressionNode node) |
| Do nothing. | |
| void | visit (MultiplicationExpressionNode node) |
| Do nothing. | |
| void | visit (ExponentiationExpressionNode node) |
| Do nothing. | |
| void | visit (FunctionExpressionNode node) |
| Do nothing. | |
Private Attributes | |
| String | name |
| double | value |
A visitor that sets a variable with a specific name to a given value.
Definition at line 30 of file SetVariable.java.
| uk.co.cogitolearning.cogpar.SetVariable.SetVariable | ( | String | name, |
| double | value | ||
| ) |
Construct the visitor with the name and the value of the variable to set.
| name | the name of the variable |
| value | the value of the variable |
Definition at line 44 of file SetVariable.java.
1.8.1.2