|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.util.StringTokenizer
public class StringTokenizer
Provides a simplified version of the J2SE StringTokenizer class for J2ME applications.
Note:: This implementation behaves like the J2SE StringTokenizer, so empty tokens are not counted and are skipped in the nextToken()/hasMoreTokens() methods. If you need to obtain empty tokens as well, please use StringUtil.split(...) instead.
Copyright (c) Enough Software 2005 - 2009
TextUtil.split(String, char),
TextUtil.split(String, char, int)| Constructor Summary | |
|---|---|
StringTokenizer(String input,
char delimiter)
Creates a new StringTokenizer. |
|
StringTokenizer(String input,
String delimiters)
Creates a new StringTokenizer. |
|
| Method Summary | |
|---|---|
int |
countTokens()
Retrieves the number of tokens which are left in this tokenizer. |
boolean |
hasMoreElements()
|
boolean |
hasMoreTokens()
Determines whether there are more tokens left. |
Object |
nextElement()
|
String |
nextToken()
Retrieves the next token. |
void |
reset(String input,
char delim)
Resets this StringTokenizer. |
void |
reset(String input,
String delimiters)
Resets this StringTokenizer. |
protected void |
updateTokenStartPosition(String input,
char[] chars,
String delimiters)
Updates the token start position. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringTokenizer(String input,
char delimiter)
input - the input, e.g. "one;two;three"delimiter - the delimiter char, e.g. ';'
NullPointerException - when the input is null
public StringTokenizer(String input,
String delimiters)
input - the input, e.g. "one;two;three"delimiters - the delimiters, e.g. ";:\t\n"
NullPointerException - when the input is null| Method Detail |
|---|
public void reset(String input,
char delim)
input - the input, e.g. "one;two;three"delim - the delimiter char, e.g. ';'
NullPointerException - when the input is null
public void reset(String input,
String delimiters)
input - the input, e.g. "one;two;three"delimiters - the delimiters, e.g. ";:\t\n"
NullPointerException - when the input is null
protected void updateTokenStartPosition(String input,
char[] chars,
String delimiters)
input - the input textchars - the characters of the input textdelimiters - the delimiter characterspublic boolean hasMoreTokens()
public String nextToken()
NoSuchElementException - when there are no more elements.public int countTokens()
public boolean hasMoreElements()
hasMoreElements in interface Enumerationpublic Object nextElement()
nextElement in interface Enumeration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||