public class Iterators
extends java.lang.Object
Constructor and Description |
---|
Iterators() |
Modifier and Type | Method and Description |
---|---|
static java.util.Iterator<Token> |
characterIterator(java.lang.CharSequence input)
An iterator over a character sequence.
|
static java.util.Iterator<Token> |
fileIterator(java.lang.String filename) |
static java.util.Iterator<Token> |
stringIterator(java.util.List<java.lang.String> input)
An iterator over a sequence of strings.
|
static java.util.Iterator<Token> |
stringIterator(java.lang.String... input)
An iterator over a sequence of strings.
|
public static java.util.Iterator<Token> characterIterator(java.lang.CharSequence input)
This method assumes that the input sequence won't be changed while the iterator is running.
input
- the character sequencepublic static java.util.Iterator<Token> stringIterator(java.lang.String... input)
input
- the string sequence.public static java.util.Iterator<Token> stringIterator(java.util.List<java.lang.String> input)
input
- the string list.public static java.util.Iterator<Token> fileIterator(java.lang.String filename) throws java.io.IOException
java.io.IOException