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.
-
-
Constructor Summary
Constructors Constructor Description GenericNumberState()
-
Method Summary
Modifier and Type Method Description TokennextToken(IScanner scanner, ITokenizer tokenizer)Gets the next token from the stream started from the character linked to this state.
-
-
-
Field Detail
-
MINUS
protected final int MINUS
- See Also:
- Constant Field Values
-
DOT
protected final int DOT
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
nextTokenin interfaceITokenizerState- 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
-
-