Protomatter Classes v1.1.6

com.protomatter.util
Class ProtoStringTokenizer

java.lang.Object
  |
  +--com.protomatter.util.ProtoStringTokenizer

public class ProtoStringTokenizer
extends java.lang.Object

A string tokenizer. Behaves like java.util.StringTokenizer extept that two delimiters next to eachother are recognized as two separate delimiters. For instance, splitting "foo||bar" using "|" as the delimiter will return three tokens ("foo", "" (empty string), and "bar").


Constructor Summary
ProtoStringTokenizer(java.lang.String string, java.lang.String tokens)
          Create a new ProtoStringTokenizer with the given string to tokenize and the given list of tokens.
 
Method Summary
 boolean hasMoreTokens()
          Determine if there are more tokens available
static void main(java.lang.String[] args)
          A test program.
 java.lang.String nextToken()
          Get the next token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtoStringTokenizer

public ProtoStringTokenizer(java.lang.String string,
                            java.lang.String tokens)
Create a new ProtoStringTokenizer with the given string to tokenize and the given list of tokens.
Method Detail

hasMoreTokens

public boolean hasMoreTokens()
Determine if there are more tokens available

nextToken

public java.lang.String nextToken()
Get the next token

main

public static void main(java.lang.String[] args)
A test program.

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6