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 TypeMethodDescriptionintTotal number of tokens present in the input stringbooleanChecks whether any token is left in the input stringbooleanChecks whether any token is left in the input stringstatic voidReturns the next token from the input string.Returns the next token from the input string.voidsetTrimTokens(boolean b) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
hasMoreElementsin interfaceEnumeration- Returns:
- boolean true, if any token is left
-
nextElement
Returns the next token from the input string.- Specified by:
nextElementin 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
-