public class VariableReference extends 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 class Expressionpublic boolean isConstant()
ExpressionisConstant in class Expressionpublic Expression simplify()
Expressionsimplify in class ExpressionCopyright © 2016. All rights reserved.