Package Behavioral.Interpreter
Class Constant
java.lang.Object
Behavioral.Interpreter.Constant
- All Implemented Interfaces:
Expression
Terminal expression representing a boolean constant in the interpreter pattern.
Implements the
Expression interface.-
Constructor Summary
ConstructorsConstructorDescriptionConstant(boolean value) Constructs a Constant expression with the specified boolean value. -
Method Summary
-
Constructor Details
-
Constant
public Constant(boolean value) Constructs a Constant expression with the specified boolean value.- Parameters:
value- the boolean value this constant represents
-
-
Method Details
-
interpret
Interprets the constant expression, returning its boolean value.- Specified by:
interpretin interfaceExpression- Parameters:
ctx- the context map (not used in this implementation)- Returns:
- the boolean value of this constant
-