Class ToBooleanExpression.ConstantToBooleanExpression

java.lang.Object
ch.andre601.expressionparser.expressions.ToBooleanExpression.ConstantToBooleanExpression
All Implemented Interfaces:
Expression, ToBooleanExpression
Enclosing interface:
ToBooleanExpression

public static class ToBooleanExpression.ConstantToBooleanExpression extends Object implements ToBooleanExpression
Pre-made class that can be used through the literal method of the ToBooleanExpression interface.
  • Constructor Details

    • ConstantToBooleanExpression

      public ConstantToBooleanExpression(boolean value)
      Constructor for creating a new ConstantToBooleanExpression.
      Parameters:
      value - boolean to store in the ConstantToBooleanExpression.
  • Method Details

    • evaluate

      public boolean evaluate()
      Method used to return a boolean value.
      Specified by:
      evaluate in interface ToBooleanExpression
      Returns:
      The boolean value stored in this ConstantToBooleanExpression.