Package rma.util
Class PowerfulTokenizer
java.lang.Object
rma.util.PowerfulTokenizer
- All Implemented Interfaces:
Enumeration
-
Constructor Summary
ConstructorsConstructorDescriptionPowerfulTokenizer
(String str, String sep) ConstructorPowerfulTokenizer
(String str, String sep, boolean bIncludeDelim) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
Total number of tokens present in the input stringboolean
Checks whether any token is left in the input stringboolean
Checks whether any token is left in the input stringstatic void
Returns the next token from the input string.Returns the next token from the input string.void
setTrimTokens
(boolean b) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Constructor Details
-
PowerfulTokenizer
Constructor- Parameters:
str
- the input stringsep
- the delimiter string
-
PowerfulTokenizer
Constructor- Parameters:
str
- the input stringsep
- the delimiter stringbIncludeDelim
- if true, include delimiters as tokens
-
-
Method Details
-
setTrimTokens
public void setTrimTokens(boolean b) -
nextToken
Returns the next token from the input string.- Returns:
- String the current token from the input string.
-
hasMoreTokens
public boolean hasMoreTokens()Checks whether any token is left in the input string- Returns:
- boolean true, if any token is left
-
hasMoreElements
public boolean hasMoreElements()Checks whether any token is left in the input string- Specified by:
hasMoreElements
in interfaceEnumeration
- Returns:
- boolean true, if any token is left
-
nextElement
Returns the next token from the input string.- Specified by:
nextElement
in interfaceEnumeration
- Returns:
- Object the current token from the input string.
-
countTokens
public int countTokens()Total number of tokens present in the input string- Returns:
- int total number of tokens
-
main
-