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

Constructor Index

 o UniStringTokenizer(Object)
 o UniStringTokenizer(Object, Object)

Method Index

 o countTokens()
used to count the number of tokens in any given string
 o hasMoreTokens()
used to determine if any tokens remain in the string
 o nextToken()
parses off the next token in the string.
 o resetTokenizer()
resets the string tokenizer to look at the very beginning of the string, to allow reparsing of the string.

Constructors

 o UniStringTokenizer
 public UniStringTokenizer(Object stringVal)
 o UniStringTokenizer
 public UniStringTokenizer(Object stringVal,
                           Object delimiterVal)

Methods

 o 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
 o hasMoreTokens
 public boolean hasMoreTokens()
used to determine if any tokens remain in the string

Returns:
boolean representing whether tokens still remain in the string
 o 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
 o 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