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.
  • 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 interface ToDoubleExpression
      Returns:
      The double value stored in this ConstantToDoubleExpression.