| java.lang.Object | |
| ↳ | java.util.StringTokenizer |
String tokenizer is used to break a string apart into tokens. If returnDelimiters is false, successive calls to nextToken() return maximal blocks of characters that do not contain a delimiter. If returnDelimiters is true, delimiters are considered to be tokens, and successive calls to nextToken() return either a one character delimiter, or a maximal block of text between delimiters.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new StringTokenizer for string using whitespace as the
delimiter, returnDelimiters is false.
| |||||||||||
Constructs a new StringTokenizer for string using the specified
delimiters, returnDelimiters is false.
| |||||||||||
Constructs a new StringTokenizer for string using the specified
delimiters and returning delimiters as tokens when specified.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the number of unprocessed tokens remaining in the string.
| |||||||||||
Returns true if unprocessed tokens remain.
| |||||||||||
Returns true if unprocessed tokens remain.
| |||||||||||
Returns the next token in the string as an Object.
| |||||||||||
Returns the next token in the string as a String.
| |||||||||||
Returns the next token in the string as a String.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface java.util.Enumeration
| |||||||||||
Constructs a new StringTokenizer for string using whitespace as the delimiter, returnDelimiters is false.
| string | the string to be tokenized |
|---|
Constructs a new StringTokenizer for string using the specified delimiters, returnDelimiters is false.
| string | the string to be tokenized |
|---|---|
| delimiters | the delimiters to use |
Constructs a new StringTokenizer for string using the specified delimiters and returning delimiters as tokens when specified.
| string | the string to be tokenized |
|---|---|
| delimiters | the delimiters to use |
| returnDelimiters | true to return each delimiter as a token |
Returns the number of unprocessed tokens remaining in the string.
Returns true if unprocessed tokens remain.
Returns true if unprocessed tokens remain.
Returns the next token in the string as an Object.
| NoSuchElementException | if no tokens remain |
|---|
Returns the next token in the string as a String.
| NoSuchElementException | if no tokens remain |
|---|
Returns the next token in the string as a String. The delimiters used are changed to the specified delimiters.
| delims | the new delimiters to use |
|---|
| NoSuchElementException | if no tokens remain |
|---|