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, wait
simplify
public static final Constant EMPTY
public double evaluate()
Expression
evaluate
in interface Expression
public boolean isConstant()
Expression
isConstant
in interface Expression
Copyright © 2020. All rights reserved.