to.etc.util
Class IntTokenizer

java.lang.Object
  extended by java.util.StringTokenizer
      extended by to.etc.util.IntTokenizer
All Implemented Interfaces:
java.util.Enumeration<java.lang.Object>

public class IntTokenizer
extends java.util.StringTokenizer

Tokenizer which can detokenize integers.

Author:
Frits Jalvingh

Constructor Summary
IntTokenizer(java.lang.String str)
           
IntTokenizer(java.lang.String str, java.lang.String delim)
           
IntTokenizer(java.lang.String str, java.lang.String delim, boolean returndelim)
           
 
Method Summary
 int nextInt()
          Takes the next token and decodes it as an integer value.
 long nextLong()
          Takes the next token and decodes it as a long value.
 
Methods inherited from class java.util.StringTokenizer
countTokens, hasMoreElements, hasMoreTokens, nextElement, nextToken, nextToken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntTokenizer

public IntTokenizer(java.lang.String str)

IntTokenizer

public IntTokenizer(java.lang.String str,
                    java.lang.String delim)

IntTokenizer

public IntTokenizer(java.lang.String str,
                    java.lang.String delim,
                    boolean returndelim)
Method Detail

nextInt

public int nextInt()
            throws java.lang.Exception
Takes the next token and decodes it as an integer value.

Returns:
the value
Throws:
java.lang.Exception - if the string was not a valid number.

nextLong

public long nextLong()
              throws java.lang.Exception
Takes the next token and decodes it as a long value.

Returns:
the value
Throws:
java.lang.Exception - if the string was not a valid number.