Class BooleanConstantReader
java.lang.Object
ch.andre601.expressionparser.parsers.ValueReader
ch.andre601.expressionparser.parsers.BooleanConstantReader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionread
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first entry of the providedlist of Tokens
and returns aConstantExpressionTemplate
using the retrieved Token's boolean value, if it is aBooleanToken
, ornull
.
-
Constructor Details
-
BooleanConstantReader
public BooleanConstantReader()
-
-
Method Details
-
read
public ExpressionTemplate read(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first entry of the providedlist of Tokens
and returns aConstantExpressionTemplate
using the retrieved Token's boolean value, if it is aBooleanToken
, ornull
.- Specified by:
read
in classValueReader
- Parameters:
parser
- ExpressionTemplateParser instance to use. The default ExpressionTemplateParser provides itself here.tokens
- List of tokens to parse into an ExpressionTemplate.collector
-ParseWarnCollector
instance to use.- Returns:
- Possibly-null
ExpressionTemplate
.
-