|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jargp.CharTracker
public class CharTracker
Character tracker for processing text. This is effectively a specialized iterator for processing characters in a string one at a time.
| Constructor Summary | |
|---|---|
CharTracker(java.lang.String source,
int offset)
Constructor |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CharTracker(java.lang.String source,
int offset)
source - string supplying character dataoffset - initial character position within source string| Method Detail |
|---|
public 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||