Class GenericNumberState

java.lang.Object
org.pipservices3.expressions.tokenizers.generic.GenericNumberState
All Implemented Interfaces:
INumberState, ITokenizerState
Direct Known Subclasses:
ExpressionNumberState

public class GenericNumberState extends Object implements INumberState
A NumberState object returns a number from a scanner. This state's idea of a number allows an optional, initial minus sign, followed by one or more digits. A decimal point and another string of digits may follow these digits.
  • Field Details

  • Constructor Details

    • GenericNumberState

      public GenericNumberState()
  • Method Details

    • nextToken

      public Token nextToken(IScanner scanner, ITokenizer tokenizer) throws Exception
      Gets the next token from the stream started from the character linked to this state.
      Specified by:
      nextToken in interface ITokenizerState
      Parameters:
      scanner - A textual string to be tokenized.
      tokenizer - A tokenizer class that controls the process.
      Returns:
      The next token from the top of the stream.
      Throws:
      Exception