|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jargp.StringTracker
String tracker for processing an array of strings. This is effectively a specialized iterator for processing an array of strings one at a time.
Constructor Summary | |
StringTracker(java.lang.String[] source,
int offset)
Constructor |
Method Summary | |
boolean |
hasNext()
Check if another string is available. |
int |
length()
Get length of array. |
java.lang.String |
next()
Get next string from array, advancing past that string. |
int |
nextOffset()
Get position of next string in array. |
java.lang.String |
peek()
Peek next string from array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringTracker(java.lang.String[] source, int offset)
source
- array supplying string dataoffset
- initial string position within source arrayMethod Detail |
public java.lang.String next()
java.lang.ArrayIndexOutOfBoundsException
- if past end of arraypublic java.lang.String peek()
java.lang.ArrayIndexOutOfBoundsException
- if past end of arraypublic boolean hasNext()
true
if a string is available,
false
if at endpublic int nextOffset()
public int length()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |