Class Token
java.lang.Object
org.mariuszgromada.math.mxparser.parsertokens.Token
- All Implemented Interfaces:
Serializable
Token recognized by mXparser after string tokenization process.
- Version:
- 6.1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionKey word string (if matched)If token was not matched then looksLike functionality is trying asses the kind of tokenstatic final intIndicator that token was not matchedprivate static final intprivate static final longintToken identifierintToken levelString tokenintToken typedoubleToken value if number -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static TokenToken cloning.static StringgetTokenTypeDescription(int tokenTypeId) Returns token type description.booleanstatic booleanisBinaryOperator(Token token) Verification if the token is a binary operator.booleanstatic booleanisIdentifier(Token token) Verification if the token is an identifier.booleanstatic booleanisLeftParenthesis(Token token) Verification if the token is a left parenthesis.booleanisNumber()static booleanVerification if the token is a number.booleanstatic booleanisParameterSeparator(Token token) Verification if the token is a parameter separator.booleanstatic booleanisRightParenthesis(Token token) Verification if the token is a right parenthesis.booleanstatic booleanisSpecialTokenName(Token token) Verification if the token is represented by a special name in the form [...].booleanstatic booleanisUnaryLeftOperator(Token token) Verification if the token is a left unary operator.booleanstatic booleanisUnaryRightOperator(Token token) Verification if the token is a right unary operator.booleanstatic booleanisUnicodeRootOperator(Token token) Verification if the token represents unicode root operatorstatic TokenCreates token representing multiplication operator.
-
Field Details
-
serialClassID
private static final int serialClassID- See Also:
-
serialVersionUID
private static final long serialVersionUID -
NOT_MATCHED
public static final int NOT_MATCHEDIndicator that token was not matched- See Also:
-
tokenStr
String token -
keyWord
Key word string (if matched) -
tokenId
public int tokenIdToken identifier -
tokenTypeId
public int tokenTypeIdToken type -
tokenLevel
public int tokenLevelToken level -
tokenValue
public double tokenValueToken value if number -
looksLike
If token was not matched then looksLike functionality is trying asses the kind of token
-
-
Constructor Details
-
Token
public Token()Default constructor
-
-
Method Details
-
isUnaryLeftOperator
Verification if the token is a left unary operator.- Returns:
- true in case token is unary left operator, otherwise returns false
-
isUnaryLeftOperator
public boolean isUnaryLeftOperator() -
isUnaryRightOperator
Verification if the token is a right unary operator.- Returns:
- true in case token is unary right operator, otherwise returns false
-
isUnaryRightOperator
public boolean isUnaryRightOperator() -
isLeftParenthesis
Verification if the token is a left parenthesis.- Returns:
- true in case token is a left parenthesis, otherwise returns false
-
isLeftParenthesis
public boolean isLeftParenthesis() -
isRightParenthesis
Verification if the token is a right parenthesis.- Returns:
- true in case token is a right parenthesis, otherwise returns false
-
isRightParenthesis
public boolean isRightParenthesis() -
isIdentifier
Verification if the token is an identifier.- Returns:
- true in case token is an identifier, otherwise returns false
-
isIdentifier
public boolean isIdentifier() -
isBinaryOperator
Verification if the token is a binary operator.- Returns:
- true in case token is a binary operator, otherwise returns false
-
isBinaryOperator
public boolean isBinaryOperator() -
isParameterSeparator
Verification if the token is a parameter separator.- Returns:
- true in case token is a parameter separator, otherwise returns false
-
isParameterSeparator
public boolean isParameterSeparator() -
isNumber
Verification if the token is a number.- Returns:
- true in case token is a number, otherwise returns false
-
isNumber
public boolean isNumber() -
isSpecialTokenName
Verification if the token is represented by a special name in the form [...].- Returns:
- true in case token is represented by a special name in the form [...], otherwise returns false
-
isSpecialTokenName
public boolean isSpecialTokenName() -
isUnicodeRootOperator
Verification if the token represents unicode root operator- Returns:
- true in case token represents unicode root operator otherwise returns false
-
isUnicodeRootOperator
public boolean isUnicodeRootOperator() -
makeMultiplyToken
Creates token representing multiplication operator.- Returns:
- token representing multiplication operator.
-
getTokenTypeDescription
Returns token type description.- Parameters:
tokenTypeId- Token type id- Returns:
- String representing token type description.
-
clone
-
clone
-