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.


Constructor Index

 o StringTokenizer(char[], char)
Constructs a string tokenizer for the specified string.
 o StringTokenizer(String, char)
Constructs a string tokenizer for the specified string.

Method Index

 o countTokens()
Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.
 o hasMoreTokens()
Tests if there are more tokens available from this tokenizer's string.
 o nextToken()
Returns the next token from this string tokenizer.
 o nextTokenChars()
Returns the next token from this string tokenizer.
 o remaining()
Return the remaining string

Constructors

 o 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.
 o 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.

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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