Class ToDoubleExpression.ConstantToDoubleExpression
java.lang.Object
ch.andre601.expressionparser.expressions.ToDoubleExpression.ConstantToDoubleExpression
- All Implemented Interfaces:
Expression
,ToDoubleExpression
- Enclosing interface:
- ToDoubleExpression
public static class ToDoubleExpression.ConstantToDoubleExpression
extends Object
implements ToDoubleExpression
Pre-made class that can be used through the
literal method
of the ToDoubleExpression
interface.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.andre601.expressionparser.expressions.ToDoubleExpression
ToDoubleExpression.ConstantToDoubleExpression
-
Constructor Summary
ConstructorDescriptionConstantToDoubleExpression
(double value) Constructor for creating a new ConstantToDoubleExpression. -
Method Summary
-
Constructor Details
-
ConstantToDoubleExpression
public ConstantToDoubleExpression(double value) Constructor for creating a new ConstantToDoubleExpression.- Parameters:
value
- double value to store in the ConstantToDoubleExpression.
-
-
Method Details
-
evaluate
public double evaluate()Method used to return a double value.- Specified by:
evaluate
in interfaceToDoubleExpression
- Returns:
- The double value stored in this ConstantToDoubleExpression.
-