|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.applsrv.aa.StringParser | +--com.ibm.dse.applsrv.aa.DummyStringParser
This is a dummy parser which processes an already parsed list of strings.
Constructor Summary | |
DummyStringParser(java.lang.String[] v)
Create a dummy parser on the specified list of strings. |
Method Summary | |
int |
countTokens()
Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception. |
boolean |
hasMoreElements()
Tests if there are more tokens available from this tokenizer's string. |
boolean |
hasMoreTokens()
Tests if there are more tokens available from this tokenizer's string. |
boolean |
isDelimiter(char c)
Check if the specified character is a delimiter. |
java.lang.String |
nextToken()
Returns the next token from this string parser or nil if there are no more tokens. |
java.lang.String |
nextToken(java.lang.String delim)
Returns the next token in this string tokenizer's string. |
java.lang.String |
rest()
Returns the rest of the string. |
void |
rewind()
Rewind the parser. |
boolean |
selectToken(int n)
Set the read pointer before the n'th token (or EOF if the n'th token doesn't exist. |
void |
set(java.lang.String str)
Reset the parse for a new string. |
void |
set(java.lang.String[] v)
Reinitialize this parser on the specified list of strings. |
java.lang.String |
source()
Returns the 'original' string. |
Methods inherited from class com.ibm.dse.applsrv.aa.StringParser |
nextElement,
restAsIntArray,
restAsIntegerArray,
restAsStringArray,
restAsStringArrays |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DummyStringParser(java.lang.String[] v)
v
- String[] - the list of strings.Method Detail |
public int countTokens()
nextToken
method can be called before it generates an exception.public boolean hasMoreElements()
true
if there are more tokens available from this tokenizer's string, false
otherwise.public boolean hasMoreTokens()
true
if there are more tokens available from this tokenizer's string, false
otherwise.public boolean isDelimiter(char c)
c
- char - the character to check.public java.lang.String nextToken()
public java.lang.String nextToken(java.lang.String delim)
delim
- String - the new delimiters.public java.lang.String rest()
public void rewind()
public boolean selectToken(int n)
n
- int - the token to select (counting from 1).public void set(java.lang.String[] v)
v
- String[] - the list of strings.public void set(java.lang.String str)
"\t\n\r"
: the space character, the tab character, the newline character, and the carriage-return character.
THIS OPERATION IS NOT SUPPORTED BY DummyStringParser.str
- String - the string to be parsed.public java.lang.String source()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |