net.sf.extjwnl.util
Class TokenizerParser

java.lang.Object
  extended by java.util.StringTokenizer
      extended by net.sf.extjwnl.util.TokenizerParser
All Implemented Interfaces:
Enumeration<Object>

public class TokenizerParser
extends StringTokenizer

A StringTokenizer with extensions to retrieve the values of numeric tokens, as well as strings.

Author:
John Didion , Aliaksandr Autayeu

Constructor Summary
TokenizerParser(String string, String delimiters)
           
 
Method Summary
 int nextByte()
          Converts the next token into a byte
 int nextHexInt()
          Converts the next token into a base 16 int.
 int nextInt()
          Converts the next token into an int
 int nextInt(int radix)
          Converts the next token into an int with base radix
 long nextLong()
          Converts the next token into a long
 int nextShort()
          Converts the next token into a short
 
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

TokenizerParser

public TokenizerParser(String string,
                       String delimiters)
Method Detail

nextByte

public int nextByte()
Converts the next token into a byte

Returns:
next byte

nextShort

public int nextShort()
Converts the next token into a short

Returns:
next short

nextInt

public int nextInt()
Converts the next token into an int

Returns:
next integer

nextInt

public int nextInt(int radix)
Converts the next token into an int with base radix

Parameters:
radix - the base into which to convert the next token
Returns:
integer with base radix

nextHexInt

public int nextHexInt()
Converts the next token into a base 16 int.

Returns:
int of a base 16

nextLong

public long nextLong()
Converts the next token into a long

Returns:
next long


Copyright © 2011. All Rights Reserved.