public interface Tokenizer<T>
extends java.util.Iterator<T>
peek(). An implementation of this interface is expected to have a constructor that takes a single argument, a
Reader.| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true if and only if this Tokenizer has more elements. |
T |
next()
Returns the next token from this Tokenizer.
|
T |
peek()
Returns the next token, without removing it, from the Tokenizer, so that the same token will be again returned on the next call to next() or peek().
|
void |
remove()
Removes from the underlying collection the last element returned by the iterator.
|
java.util.List<T> |
tokenize()
Returns all tokens of this Tokenizer as a List for convenience.
|
T next()
next in interface java.util.Iterator<T>java.util.NoSuchElementException - if the token stream has no more tokens.boolean hasNext()
true if and only if this Tokenizer has more elements.hasNext in interface java.util.Iterator<T>void remove()
remove in interface java.util.Iterator<T>T peek()
java.util.NoSuchElementException - if the token stream has no more tokens.java.util.List<T> tokenize()