org.codehaus.mojo.natives.parser
Class CaseInsensitiveLetterState
java.lang.Object
org.codehaus.mojo.natives.parser.AbstractParserState
org.codehaus.mojo.natives.parser.CaseInsensitiveLetterState
public final class CaseInsensitiveLetterState
- extends AbstractParserState
This parser state checks consumed characters against a specific character
(case insensitive).
- Author:
- Curt Arnold
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CaseInsensitiveLetterState
public CaseInsensitiveLetterState(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
consume
public AbstractParserState consume(char ch)
- Consumes a character and returns the next state for the parser.
- Specified by:
consume
in class AbstractParserState
- Parameters:
ch
- next character
- Returns:
- the configured nextState if ch is the expected character or the
configure noMatchState otherwise.
Copyright © 2011 Codehaus. All Rights Reserved.