|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.parcinj.AbstractSymbol<P>
net.sf.parcinj.OneOrMore<P>
public class OneOrMore<P extends Processor>
Wraps a symbol which will be executed one or more times.
Constructor Summary | |
---|---|
OneOrMore(Symbol<P> symbol)
Creates an instance for the specified symbol. |
Method Summary | |
---|---|
void |
doProcess(TokenIterator iterator,
P processor)
Processes the current symbol of the specified iterator by the wrapped symbol and repeats this as long as the symbol still matches. |
MatchingResult |
matches(Token token)
Returns MatchingResult.OK if the wrapped symbol matches. |
Methods inherited from class net.sf.parcinj.AbstractSymbol |
---|
followedBy, oneOrMoreTimes, optional, or, process, zeroOrMoreTimes, zeroOrMoreTimesSeparatedBy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OneOrMore(Symbol<P> symbol)
Method Detail |
---|
public MatchingResult matches(Token token)
MatchingResult.OK
if the wrapped symbol matches.
token
- Token to be checked. Will be null
if beyond last
token.public void doProcess(TokenIterator iterator, P processor)
doProcess
in class AbstractSymbol<P extends Processor>
processor
- Processor
who does the actual processing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |