public final class WhitespaceOrLetterState extends AbstractParserState
| Modifier and Type | Field and Description |
|---|---|
private AbstractParserState |
nextState
Next state if the character is found.
|
private char |
thisLetter
Character to match.
|
| Constructor and Description |
|---|
WhitespaceOrLetterState(AbstractParser parser,
char matchLetter,
AbstractParserState nextStateArg)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractParserState |
consume(char ch)
Consumes a character and returns the next state for the parser.
|
getParserprivate final AbstractParserState nextState
private final char thisLetter
public WhitespaceOrLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg)
parser - parsermatchLetter - letter to matchnextStateArg - next state if a match on the letterpublic AbstractParserState consume(char ch)
consume in class AbstractParserStatech - next character @returns the configured nextState if ch is the expected character or the configure
noMatchState otherwise.