TT
- Defines the token types that this scanner will producepublic interface StringScanner<TT extends Enum<TT>> extends ProducerWhichThrows<AbstractScanner.Token<TT>,ScanException>
produce()
Modifier and Type | Method and Description |
---|---|
int |
getOffset() |
int |
getPreviousTokenOffset() |
AbstractScanner.Token<TT> |
produce()
Before
setInput(CharSequence) is called, this method returns null . |
StringScanner<TT> |
setInput(CharSequence cs) |
toString
StringScanner<TT> setInput(CharSequence cs)
cs
- The CharSequence
from which following calls to produce()
will scan tokens@Nullable AbstractScanner.Token<TT> produce() throws ScanException
setInput(CharSequence)
is called, this method returns null
. After setInput(CharSequence)
was called, this method breaks the input char character sequence up into tokens and
returns them one by one. When the input char sequence is exhausted, null
is returned until setInput(CharSequence)
is called again.produce
in interface ProducerWhichThrows<AbstractScanner.Token<TT extends Enum<TT>>,ScanException>
ScanException
int getOffset()
setInput(CharSequence)
where the previously
scanned token ends, or 0 after the call to setInput(CharSequence)
and before the first
call to produce()
int getPreviousTokenOffset()
setInput(CharSequence)
where the previously
scanned token begins, or -1 after the call to setInput(CharSequence)
and before the first
call to produce()
Copyright © 2018 Arno Unkrig. All rights reserved.