|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides the standard interface to which all iterators must conform. The use of a generic iterator allows any parser to be linked to any source of input and enables the iterator implementor to optimize where required. The PScanner defines only the output of an iterator to be in the form of a standard Java Character or String, it makes no demands as to the input. It is upto the class implementing this interface to make any necessary conversions to support these output formats.
Note, that during parsing the index forcharAt(long)
might not increase monotonically!
Method Summary | |
char |
charAt(long index)
Returns the character at the specified location. |
long |
length()
Gives the length of this scanners' content. |
java.lang.String |
substring(long beginIndex,
long endIndex)
Returns the part of the input from the beginning upto the ending index locations. |
Method Detail |
public char charAt(long index) throws java.lang.IndexOutOfBoundsException
index
- position of the character to return
java.lang.IndexOutOfBoundsException
- when the specified index is either less than zero or equal or
more than the lengthpublic long length()
public java.lang.String substring(long beginIndex, long endIndex)
beginIndex
- starting offset from which to extract the substringendIndex
- ending offset at which the substring ends
String
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |