public class CharTracker
extends java.lang.Object
| Constructor and Description |
|---|
CharTracker(java.lang.String source,
int offset)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Check if another character is available.
|
char |
next()
Get next character from string, advancing past that character.
|
char |
peek()
Peek next character from string.
|
public CharTracker(java.lang.String source,
int offset)
source - string supplying character dataoffset - initial character position within source stringpublic char next()
java.lang.ArrayIndexOutOfBoundsException - if past end of textpublic char peek()
java.lang.ArrayIndexOutOfBoundsException - if past end of textpublic boolean hasNext()
true if a character is available,
false if at end