Class NegatedExpressionReader
java.lang.Object
ch.andre601.expressionparser.parsers.ValueReader
ch.andre601.expressionparser.parsers.NegatedExpressionReader
ValueReader creating a negated ExpressionTemplate when the first token is the provided one.-
Constructor Summary
ConstructorsConstructorDescriptionNegatedExpressionReader(Token negationToken) Sets theTokenthat this ValueReader should look for. -
Method Summary
Modifier and TypeMethodDescriptionread(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first entry of the list of Tokens and returns a negated ExpressionTemplate if the retrieved token is the set negation Token, elsenull.
-
Constructor Details
-
NegatedExpressionReader
-
-
Method Details
-
read
public ExpressionTemplate read(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first entry of the list of Tokens and returns a negated ExpressionTemplate if the retrieved token is the set negation Token, elsenull.- Specified by:
readin classValueReader- Parameters:
parser- ExpressionTemplateParser instance to use. The default ExpressionTemplateParser provides itself here.tokens- List of tokens to parse into an ExpressionTemplate.collector-ParseWarnCollectorinstance to use.- Returns:
- Possibly-null, negated
ExpressionTemplate.
-