public class PowerfulTokenizer
extends java.lang.Object
implements java.util.Enumeration
Constructor and Description |
---|
PowerfulTokenizer(java.lang.String str,
java.lang.String sep)
Constructor
|
PowerfulTokenizer(java.lang.String str,
java.lang.String sep,
boolean bIncludeDelim)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
countTokens()
Total number of tokens present in the input string
|
boolean |
hasMoreElements()
Checks whether any token is left in the input string
|
boolean |
hasMoreTokens()
Checks whether any token is left in the input string
|
static void |
main(java.lang.String[] args) |
java.lang.Object |
nextElement()
Returns the next token from the input string.
|
java.lang.String |
nextToken()
Returns the next token from the input string.
|
public PowerfulTokenizer(java.lang.String str, java.lang.String sep)
str
- the input stringsep
- the delimiter stringpublic PowerfulTokenizer(java.lang.String str, java.lang.String sep, boolean bIncludeDelim)
str
- the input stringsep
- the delimiter stringbIncludeDelim
- if true, include delimiters as tokenspublic java.lang.String nextToken()
public boolean hasMoreTokens()
public boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
public java.lang.Object nextElement()
nextElement
in interface java.util.Enumeration
public int countTokens()
public static void main(java.lang.String[] args)