Package org.codehaus.mojo.natives.parser
Class LetterState
java.lang.Object
org.codehaus.mojo.natives.parser.AbstractParserState
org.codehaus.mojo.natives.parser.LetterState
This parser state checks consumed characters against a specific character.
- Author:
- Curt Arnold
-
Constructor Summary
ConstructorsConstructorDescriptionLetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg, AbstractParserState noMatchStateArg) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionconsume(char ch) Consumes a character and returns the next state for the parser.Methods inherited from class org.codehaus.mojo.natives.parser.AbstractParserState
getParser
-
Constructor Details
-
LetterState
public LetterState(AbstractParser parser, char matchLetter, AbstractParserState nextStateArg, AbstractParserState noMatchStateArg) Constructor.- Parameters:
parser- parsermatchLetter- letter to matchnextStateArg- next state if a match on the letternoMatchStateArg- state if no match on letter
-
-
Method Details
-
consume
Consumes a character and returns the next state for the parser.- Specified by:
consumein classAbstractParserState- Parameters:
ch- next character- Returns:
- the configured nextState if ch is the expected character or the configure noMatchState otherwise.
-