All Packages Class Hierarchy This Package Previous Next Index
Class com.bulletproof.util.StringTokenizer
java.lang.Object
|
+----com.bulletproof.util.StringTokenizer
- public class StringTokenizer
- extends Object
Class StringTokenizer represents a class for breaking up a String.
-
StringTokenizer(char[], char)
- Constructs a string tokenizer for the specified string.
-
StringTokenizer(String, char)
- Constructs a string tokenizer for the specified string.
-
countTokens()
- Calculates the number of times that this tokenizer's
nextToken method can be called before it generates an
exception.
-
hasMoreTokens()
- Tests if there are more tokens available from this tokenizer's string.
-
nextToken()
- Returns the next token from this string tokenizer.
-
nextTokenChars()
- Returns the next token from this string tokenizer.
-
remaining()
- Return the remaining string
StringTokenizer
public StringTokenizer(String str,
char delim)
- Constructs a string tokenizer for the specified string. The
character in the
delim argument is the delimiter
for separating tokens.
- Parameters:
- str - a string to be parsed.
- delim - the delimiter.
StringTokenizer
public StringTokenizer(char str[],
char delim)
- Constructs a string tokenizer for the specified string. The
character in the
delim argument is the delimiter
for separating tokens.
- Parameters:
- str - a string to be parsed in a char array.
- delim - the delimiter.
hasMoreTokens
public boolean hasMoreTokens()
- Tests if there are more tokens available from this tokenizer's string.
- Returns:
-
true if there are more tokens available from this
tokenizer's string; false otherwise.
nextToken
public String nextToken()
- Returns the next token from this string tokenizer.
- Returns:
- the next token from this string tokenizer.
- Throws: NoSuchElementException
- if there are no more tokens in this
tokenizer's string.
nextTokenChars
public char[] nextTokenChars()
- Returns the next token from this string tokenizer.
- Returns:
- the next token from this string tokenizer.
- Throws: NoSuchElementException
- if there are no more tokens in this
tokenizer's string.
countTokens
public int countTokens()
- Calculates the number of times that this tokenizer's
nextToken method can be called before it generates an
exception.
- Returns:
- the number of tokens remaining in the string.
remaining
public String remaining()
- Return the remaining string
- Returns:
- the remaining string if all tokens have not been read
All Packages Class Hierarchy This Package Previous Next Index