public class Constant extends Object implements 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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsimplifypublic static final Constant EMPTY
public double evaluate()
Expressionevaluate in interface Expressionpublic boolean isConstant()
ExpressionisConstant in interface ExpressionCopyright © 2018. All rights reserved.