Java Reference
In-Depth Information
public StringTokenizer(String theString)
Constructor for a tokenizer that will use whitespace characters as separators when fi nding
tokens in theString .
public StringTokenizer(String theString, String delimiters)
Constructor for a tokenizer that will use the characters in the string delimiters as separators
when fi nding tokens in theString .
public StringTokenizer(String theString, String delimiters,
boolean returnDelimiters)
Creates a tokenizer similar to StringTokenizer(String theString, String delimiters) ,
but with the following differences: If returnDelimiters is true , the delimiters are also returned
by nextToken ; each delimiter is returned as a one-character String . If returnDelimiters is
false , the deliminters are not returned by nextToken. Thus, if returnDelimiters is false ,
the tokenizer created is the same as with StringTokenizer(String theString,
String delimiters) .
public int countTokens()
Returns the number of tokens remaining to be returned by nextToken .
public boolean hasMoreElements()
Same as hasMoreTokens .
public boolean hasMoreTokens()
Tests whether there are more tokens available from this tokenizer's string. When used in
conjunction with nextToken , it returns true as long as nextToken has not yet returned all the
tokens in the string; returns false otherwise.
public String nextToken()
Returns the next token from this tokenizer's string.
Throws:
NoSuchElementException if there are no more tokens to return. NoSuchElementException
is one of the exceptions that need not be declared in a throws clause or caught in a catch block.
Vector<T>
Package: java.util
Ancestor classes:
Object
|
+--AbstractCollection<T>
|
+--AbstractList<T>
|
+--Vector<T>
 
Search WWH ::




Custom Search