public class VariableReference extends Object implements Expression
| Constructor and Description |
|---|
VariableReference(Variable var)
Creates a new reference to the given variable.
|
| Modifier and Type | Method and Description |
|---|---|
double |
evaluate()
Evaluates the expression to a double number.
|
boolean |
isConstant()
Determines the this expression is constant
|
Expression |
simplify()
Returns a simplified version of this expression.
|
String |
toString() |
public VariableReference(Variable var)
var - the variable to access when this expression is evaluatedpublic double evaluate()
Expressionevaluate in interface Expressionpublic boolean isConstant()
ExpressionisConstant in interface Expressionpublic Expression simplify()
Expressionsimplify in interface ExpressionCopyright © 2018. All rights reserved.