asjava.uniclientlibs
Class UniStringTokenizer

java.lang.Object
  extended byasjava.uniclientlibs.UniStringTokenizer

public class UniStringTokenizer
extends java.lang.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

Since:
UNICLIENTLIBS 1.0
Version:
Version 1.0
Author:
David T. Meeks

Constructor Summary
UniStringTokenizer(java.lang.Object stringVal)
           
UniStringTokenizer(java.lang.Object stringVal, java.lang.Object delimiterVal)
           
 
Method Summary
 int countTokens()
          used to count the number of tokens in any given string
 boolean hasMoreTokens()
          used to determine if any tokens remain in the string
 java.lang.String nextToken()
          parses off the next token in the string.
 void resetTokenizer()
          resets the string tokenizer to look at the very beginning of the string, to allow reparsing of the string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniStringTokenizer

public UniStringTokenizer(java.lang.Object stringVal)

UniStringTokenizer

public UniStringTokenizer(java.lang.Object stringVal,
                          java.lang.Object delimiterVal)
Method Detail

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
Since:
UNICLIENTLIBS 1.0

hasMoreTokens

public boolean hasMoreTokens()
used to determine if any tokens remain in the string

Returns:
boolean representing whether tokens still remain in the string
Since:
UNICLIENTLIBS 1.0

nextToken

public java.lang.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
Since:
UNICLIENTLIBS 1.0

resetTokenizer

public void resetTokenizer()
resets the string tokenizer to look at the very beginning of the string, to allow reparsing of the string.

Since:
UNICLIENTLIBS 1.0