org.cafesip.gwtcomp.client.utils
Class StringTokenizer

java.lang.Object
  extended by org.cafesip.gwtcomp.client.utils.StringTokenizer

public class StringTokenizer
extends Object

A poor man's StringTokenizer since the GWT emulation library does not provide one yet.

Author:
Amit Chatterjee

Constructor Summary
StringTokenizer(String text, char delimiter)
          A constructor for this class.
 
Method Summary
 int countTokens()
          Returns the token count.
 String tokenAt(int index)
          Returns the token at a given index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTokenizer

public StringTokenizer(String text,
                       char delimiter)
A constructor for this class.

Parameters:
text - text to be tokenized.
delimiter - the delimiter character.
Method Detail

countTokens

public int countTokens()
Returns the token count.

Returns:
the number of tokens

tokenAt

public String tokenAt(int index)
Returns the token at a given index.

Parameters:
index - index starts with 0
Returns:
the token at the specified index


Copyright © 2010 Cafesip.org. All Rights Reserved.