![]() |
GrammarScope
4.0.0
|
Public Member Functions | |
T | next () |
boolean | hasNext () |
void | remove () |
T | peek () |
List< T > | tokenize () |
Protected Member Functions | |
abstract T | getNext () |
Protected Attributes | |
T | nextToken |
An abstract tokenizer. Tokenizers extending AbstractTokenizer need only implement the getNext()
method. This implementation does not allow null tokens, since null is used in the protected nextToken field to signify that no more tokens are available.
|
abstractprotected |
Internally fetches the next token.
boolean grammarscope.io.read.AbstractTokenizer< T >.hasNext | ( | ) |
Returns true
if this Tokenizer has more elements.
Implements grammarscope.io.read.Tokenizer< T >.
T grammarscope.io.read.AbstractTokenizer< T >.next | ( | ) |
Returns the next token from this Tokenizer.
java.util.NoSuchElementException | if the token stream has no more tokens. |
Implements grammarscope.io.read.Tokenizer< T >.
T grammarscope.io.read.AbstractTokenizer< T >.peek | ( | ) |
This is an optional operation, by default supported.
java.util.NoSuchElementException | if the token stream has no more tokens. |
Implements grammarscope.io.read.Tokenizer< T >.
void grammarscope.io.read.AbstractTokenizer< T >.remove | ( | ) |
This is an optional operation, by default not supported.
Implements grammarscope.io.read.Tokenizer< T >.
List<T> grammarscope.io.read.AbstractTokenizer< T >.tokenize | ( | ) |
Returns text as a List of tokens.
Implements grammarscope.io.read.Tokenizer< T >.
|
protected |