All Packages Class Hierarchy This Package Previous Next Index
Class asjava.uniclientlibs.UniStringTokenizer
java.lang.Object
|
+----asjava.uniclientlibs.UniStringTokenizer
- public class UniStringTokenizer
- extends Object
UniStringTokenizer
is a virtual extension of the java.util.StringTokenizer
class with one key difference. Using the base java model, delimiters are treated
as 'white space', and a sequential series of delimiters is treated as a single delimiter.
for many of our needs, using UniVerse mark characters as delimiters, we need to treat
each delimiter as separating a new token, and the nextToken
method will
reflect that difference
- Version:
- Version 1.0
- Author:
- David T. Meeks
-
UniStringTokenizer(Object)
-
-
UniStringTokenizer(Object, Object)
-
-
countTokens()
- used to count the number of tokens in any given string
-
hasMoreTokens()
- used to determine if any tokens remain in the string
-
nextToken()
- parses off the next token in the string.
-
resetTokenizer()
- resets the string tokenizer to look at the very beginning of the string, to allow
reparsing of the string.
UniStringTokenizer
public UniStringTokenizer(Object stringVal)
UniStringTokenizer
public UniStringTokenizer(Object stringVal,
Object delimiterVal)
countTokens
public int countTokens()
- used to count the number of tokens in any given string
- Returns:
- integer representing the number of tokens available in this string
hasMoreTokens
public boolean hasMoreTokens()
- used to determine if any tokens remain in the string
- Returns:
- boolean representing whether tokens still remain in the string
nextToken
public String nextToken()
- parses off the next token in the string. Will extract the next string (token)
that is separated by the given delimiter character. It will return a
null
if no more tokens exist
- Returns:
- String representing the next token or a
null
if no more tokens exist
resetTokenizer
public void resetTokenizer()
- resets the string tokenizer to look at the very beginning of the string, to allow
reparsing of the string.
All Packages Class Hierarchy This Package Previous Next Index