Uses of Class
ch.andre601.expressionparser.tokens.Token
Package
Description
-
Uses of Token in ch.andre601.expressionparser
Modifier and TypeMethodDescriptionExpressionParserEngine.Builder.addOperator
(Token token, Operator operator) Adds a newToken instance
as key with a newOperator instance
as value to use by theDefaultExpressionParserEngine
.ModifierConstructorDescriptionDefaultExpressionParserEngine
(List<TokenReader> tokenReaders, com.google.common.collect.ImmutableMap<Token, Operator> operators, com.google.common.collect.ImmutableList<ValueReader> valueReaders) Creates a new instance of this class. -
Uses of Token in ch.andre601.expressionparser.expressions
-
Uses of Token in ch.andre601.expressionparser.parsers
Modifier and TypeMethodDescriptionExpressionTemplateParser.parse
(List<Token> tokens, ParseWarnCollector collector) Takes a list ofTokens
and converts them into aExpressionTemplate
instance.BooleanConstantReader.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
.NegatedExpressionReader.read
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first entry of thelist of Tokens
and returns anegated ExpressionTemplate
if the retrieved token is the set negation Token, elsenull
.NegatedNumberReader.read
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first token of thelist of Tokens
and returns aExpressionTemplate
who's number value is negated, if the retrieved Token is the set negation Token, ornull
.NumberConstantReader.read
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first token of thelist of Tokens
and returns aConstantExpressionTemplate
with its double value set from the retrieved Token, if it is aNumberToken
, elsenull
.ParenthesisedExpressionReader.read
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first Token from thetoken list
and checks, if it is the set opening parenthesis Token.StringConstantReader.read
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Takes the first Token in thelist of Tokens
and returns aConstantExpressionTemplate
whose String value is the one from the retrieved Token, if it is aStringToken
, elsenull
.abstract ExpressionTemplate
ValueReader.read
(ExpressionTemplateParser parser, List<Token> tokens, ParseWarnCollector collector) Method called by theExpressionTemplateParser
to convert a List ofToken
into a singleExpressionTemplate
.ModifierConstructorDescriptionNegatedExpressionReader
(Token negationToken) Sets theToken
that this ValueReader should look for.NegatedNumberReader
(Token negationToken) Sets theToken
that this ValueReader should look for.ParenthesisedExpressionReader
(Token openingParenthesis, Token closingParenthesis) Sets thetokens
to look for when parsing.ModifierConstructorDescriptionExpressionTemplateParser
(com.google.common.collect.ImmutableMap<Token, Operator> operators, com.google.common.collect.ImmutableList<ValueReader> valueReaders) Creates a new instance of this class which uses the provided Map ofTokens
and theirOperators
and also the provided list ofValueReaders
. -
Uses of Token in ch.andre601.expressionparser.tokens
Modifier and TypeClassDescriptionclass
Token instance
representing and holding a boolean value.class
Token instance
representing a number (double).class
Token instance
representing a String value.Modifier and TypeFieldDescriptionstatic final Token
DefaultTokens.ADD
static final Token
DefaultTokens.AND
static final Token
DefaultTokens.CLOSING_PARENTHESIS
static final Token
DefaultTokens.CONCAT_STRING
static final Token
DefaultTokens.CONTAINS
static final Token
DefaultTokens.DIVIDE
static final Token
DefaultTokens.ENDS_WITH
static final Token
DefaultTokens.EQUAL
static final Token
DefaultTokens.EQUAL_IGNORE_CASE
static final Token
DefaultTokens.GREATER_OR_EQUAL_THAN
static final Token
DefaultTokens.GREATER_THAN
static final Token
DefaultTokens.LESS_OR_EQUAL_THAN
static final Token
DefaultTokens.LESS_THAN
static final Token
DefaultTokens.MULTIPLY
static final Token
DefaultTokens.NEGATION
static final Token
DefaultTokens.NOT_EQUAL
static final Token
DefaultTokens.NOT_EQUAL_IGNORE_CASE
static final Token
DefaultTokens.OPENING_PARENTHESIS
static final Token
DefaultTokens.OR
static final Token
DefaultTokens.STARTS_WITH
static final Token
DefaultTokens.SUBTRACT
-
Uses of Token in ch.andre601.expressionparser.tokens.readers
Modifier and TypeMethodDescriptionNonQuotedLiteralTokenReader.read
(String text, ParsePosition position, ParseWarnCollector collector) Iterates through the provided String until it finds a Whitespace Character at which point it returns a newStringToken
whose value is the retrieved String up until the whitespace character.NumberTokenReader.read
(String text, ParsePosition position, ParseWarnCollector collector) Takes the provided Text and parses the content from its current position using aNumberFormat
instance.PatternTokenReader.read
(String text, ParsePosition position, ParseWarnCollector collector) Makes aregion matches check
to see if the String at the current position matches the provided pattern String.QuotedLiteralTokenReader.read
(String text, ParsePosition position, ParseWarnCollector collector) Checks if the current position is less than the text length and if the character at current position is the character set in this TokenReader.abstract Token
TokenReader.read
(String text, ParsePosition position, ParseWarnCollector collector) Abstract method that is called by the ExpressionparserEngine to turn the provided String into a token.ModifierConstructorDescriptionPatternTokenReader
(Token token, String pattern) Creates a new PatternTokenReader instance with the providedToken instance
being used for the provided Pattern String.PatternTokenReader
(Token token, String pattern, boolean ignoreCase) Creates a new PatternTokenReader instance with the providedToken instance
being used for the provided Pattern String.