Class NumberToken
java.lang.Object
com.singularsys.jep.configurableparser.tokens.Token
com.singularsys.jep.configurableparser.tokens.NumberToken
- All Implemented Interfaces:
Serializable
Represent numbers.
- Author:
- Richard Morris
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class com.singularsys.jep.configurableparser.tokens.Token
equals, getColumnNumber, getLength, getLineNumber, getSource, hashCode, isBinary, isComment, isFunction, isIdentifier, isOperator, isPrefix, isString, isSuffix, isSymbol, isTerminal, isTernary, isWhiteSpace, setPosition, toString
-
Constructor Details
-
NumberToken
Construct a number token.- Parameters:
source
- text of the input matchedvalue
- value of the object
-
-
Method Details
-
getValue
Gets the value of the object.- Returns:
- A Double or other object containing the value.
-
isNumber
public boolean isNumber() -
isImplicitMulRhs
public boolean isImplicitMulRhs()Whether numbers can appear on the rhs of implicit multiplication 'x 2'.- Overrides:
isImplicitMulRhs
in classToken
- Returns:
- true
-