org.apache.xalan.templates
Class ElemNumber.NumberFormatStringTokenizer

java.lang.Object
  extended by org.apache.xalan.templates.ElemNumber.NumberFormatStringTokenizer
Enclosing class:
ElemNumber

 class ElemNumber.NumberFormatStringTokenizer
extends java.lang.Object

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


Field Summary
private  int currentPosition
          Current position in the format string
private  int maxPosition
          Index of last character in the format string
private  java.lang.String str
          Format string to be tokenized
 
Constructor Summary
ElemNumber.NumberFormatStringTokenizer(java.lang.String str)
          Construct a NumberFormatStringTokenizer.
 
Method Summary
 int countTokens()
          Calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.
 boolean hasMoreTokens()
          Tells if nextToken will throw an exception if it is called.
 boolean isLetterOrDigitAhead()
          Tells if there is a digit or a letter character ahead.
 boolean nextIsSep()
          Tells if there is a digit or a letter character ahead.
 java.lang.String nextToken()
          Returns the next token from this string tokenizer.
 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
Current position in the format string


maxPosition

private int maxPosition
Index of last character in the format string


str

private java.lang.String str
Format string to be tokenized

Constructor Detail

ElemNumber.NumberFormatStringTokenizer

public ElemNumber.NumberFormatStringTokenizer(java.lang.String str)
Construct a NumberFormatStringTokenizer.

Parameters:
str - Format string to be tokenized
Method Detail

reset

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


nextToken

public 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.

isLetterOrDigitAhead

public boolean isLetterOrDigitAhead()
Tells if there is a digit or a letter character ahead.

Returns:
true if there is a number or character ahead.

nextIsSep

public boolean nextIsSep()
Tells if there is a digit or a letter character ahead.

Returns:
true if there is a number or character ahead.

hasMoreTokens

public 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

public 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()