|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.util.Tokenizer
public class Tokenizer
Replacement for StringTokenizer in java.util, because of bug in the Sun's implementation.
Field Summary | |
---|---|
static String |
DEFAULT_DELIMITERS
Deprecated. Default delimiters " \t\n\r\f": the space character, the tab character, the newline character, the carriage-return character, and the form-feed character. |
Constructor Summary | |
---|---|
Tokenizer(String str)
Deprecated. Constructs a string tokenizer for the specified string. |
|
Tokenizer(String str,
char delim)
Deprecated. Constructs a string tokenizer for the specified string. |
|
Tokenizer(String str,
String delim)
Deprecated. Constructs a string tokenizer for the specified string. |
|
Tokenizer(String str,
String delim,
boolean returnTokens)
Deprecated. Constructs a string tokenizer for the specified string. |
Method Summary | |
---|---|
int |
countTokens()
Deprecated. Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception. |
boolean |
hasMoreElements()
Deprecated. Returns the same value as the hasMoreTokens method. |
boolean |
hasMoreTokens()
Deprecated. Tests if there are more tokens available from this tokenizer's string. |
Object |
nextElement()
Deprecated. Returns the same value as the nextToken method, except that its declared return value is Object rather than String. |
String |
nextToken()
Deprecated. Returns the next token from this string tokenizer. |
String |
nextToken(String delim)
Deprecated. Returns the next token in this string tokenizer's string. |
void |
reset()
Deprecated. Resets this tokenizer's state so the tokenizing starts from the begin. |
static String[] |
tokenize(String str,
String delim,
boolean returnTokens)
Deprecated. Constructs a string tokenizer for the specified string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_DELIMITERS
Constructor Detail |
---|
public Tokenizer(String str, String delim, boolean returnTokens)
str
- a string to be parseddelim
- the delimitersreturnTokens
- flag indicating whether to return the delimiters
as tokenspublic Tokenizer(String str, String delim)
str
- a string to be parseddelim
- the delimiterspublic Tokenizer(String str, char delim)
str
- a string to be parseddelim
- the delimiterpublic Tokenizer(String str)
str
- a string to be parsedMethod Detail |
---|
public boolean hasMoreTokens()
public String nextToken() throws NoSuchElementException
NoSuchElementException
- if there are no more tokens in this
tokenizer's stringpublic String nextToken(String delim) throws NoSuchElementException
delim
- the new delimiters
NoSuchElementException
- if there are no more tokens in this
tokenizer's string.public boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public Object nextElement()
nextElement
in interface Enumeration
NoSuchElementException
- if there are no more tokens in this
tokenizer's stringpublic int countTokens()
public void reset()
public static String[] tokenize(String str, String delim, boolean returnTokens)
str
- a string to be parseddelim
- the delimitersreturnTokens
- flag indicating whether to return the delimiters
as tokens
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |