Protomatter Software v1.1.7

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 Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7