Class ValueReader
java.lang.Object
ch.andre601.expressionparser.parsers.ValueReader
- Direct Known Subclasses:
BooleanConstantReader,NegatedExpressionReader,NegatedNumberReader,NumberConstantReader,ParenthesisedExpressionReader,StringConstantReader
Abstract class used in other classes to create a ValueReader.
The Value reader goes through the collection of Tokens and tries to convert them into a
The Value reader goes through the collection of Tokens and tries to convert them into a
ExpressionTemplate should the token match a specific one.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ExpressionTemplateread(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Method called by theExpressionTemplateParserto convert a List ofTokeninto a singleExpressionTemplate.
-
Constructor Details
-
ValueReader
public ValueReader()
-
-
Method Details
-
read
public abstract ExpressionTemplate read(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Method called by theExpressionTemplateParserto convert a List ofTokeninto a singleExpressionTemplate.- 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 ExpressionTemplate.
-