|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pobs.scanner.PStringScanner
Basic iterator for strings. Does nothing but pass allong the iterator interface to the encapsuled String.
Constructor Summary | |
PStringScanner(java.lang.String string)
Sole constructor. |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PStringScanner(java.lang.String string)
string
- the source string for this iteratorMethod Detail |
public char charAt(long index) throws java.lang.IndexOutOfBoundsException
PScanner
charAt
in interface PScanner
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()
PScanner
length
in interface PScanner
public java.lang.String substring(long beginIndex, long endIndex)
PScanner
substring
in interface PScanner
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 |