public abstract class AbstractReader extends Object
String source.| Modifier and Type | Field and Description |
|---|---|
protected int |
current |
protected String |
source |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReader(String source)
Creates a new reader, from the given source material.
|
| Modifier and Type | Method and Description |
|---|---|
protected char |
advance()
Gets the next character to be read, consuming it.
|
boolean |
hasNext()
Establishes whether there remains to be something to read.
|
protected char |
peek()
Gets the next character to be read, without consuming it.
|
protected char |
previous()
Gets the previous character read.
|
protected final String source
protected int current
protected AbstractReader(String source)
source - The source to read frompublic boolean hasNext()
true if there is something to read;
false otherwiseprotected char peek()
IllegalStateException - If there is no character availableprotected char previous()
IllegalStateException - If there is no character availableprotected char advance()
IllegalStateException - If there is no character available