public class Constant extends Expression
| Modifier and Type | Field and Description |
|---|---|
static Constant |
EMPTY
Used as dummy expression by the parser if an error occurs while parsing.
|
| Constructor and Description |
|---|
Constant(double value) |
| Modifier and Type | Method and Description |
|---|---|
double |
evaluate()
Evaluates the expression to a double number.
|
boolean |
isConstant()
Determines the this expression is constant
|
String |
toString() |
simplifypublic static final Constant EMPTY
public double evaluate()
Expressionevaluate in class Expressionpublic boolean isConstant()
ExpressionisConstant in class ExpressionCopyright © 2016. All rights reserved.