org.apache.xalan.transformer
Class NumeratorFormatter.NumberFormatStringTokenizer

java.lang.Object
  extended by org.apache.xalan.transformer.NumeratorFormatter.NumberFormatStringTokenizer
Enclosing class:
NumeratorFormatter

static class NumeratorFormatter.NumberFormatStringTokenizer
extends java.lang.Object

This class returns tokens using non-alphanumberic characters as delimiters.


Field Summary
private  int currentPosition
          Field holding the current position in the string
private  int maxPosition
          The total length of the string
private  java.lang.String str
          The string to tokenize
 
Constructor Summary
NumeratorFormatter.NumberFormatStringTokenizer(java.lang.String str)
          Construct a NumberFormatStringTokenizer.
 
Method Summary
(package private)  int countTokens()
          Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.
(package private)  boolean hasMoreTokens()
          Tells if nextToken will throw an exception * if it is called.
(package private)  java.lang.String nextToken()
          Returns the next token from this string tokenizer.
(package private)  void reset()
          Reset tokenizer so that nextToken() starts from the beginning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPosition

private int currentPosition
Field holding the current position in the string


maxPosition

private int maxPosition
The total length of the string


str

private java.lang.String str
The string to tokenize

Constructor Detail

NumeratorFormatter.NumberFormatStringTokenizer

NumeratorFormatter.NumberFormatStringTokenizer(java.lang.String str)
Construct a NumberFormatStringTokenizer.

Parameters:
str - The string to tokenize
Method Detail

reset

void reset()
Reset tokenizer so that nextToken() starts from the beginning.


nextToken

java.lang.String nextToken()
Returns the next token from this string tokenizer.

Returns:
the next token from this string tokenizer.
Throws:
java.util.NoSuchElementException - if there are no more tokens in this tokenizer's string.

hasMoreTokens

boolean hasMoreTokens()
Tells if nextToken will throw an exception * if it is called.

Returns:
true if nextToken can be called * without throwing an exception.

countTokens

int countTokens()
Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.

Returns:
the number of tokens remaining in the string using the current delimiter set.
See Also:
StringTokenizer.nextToken()