Package com.fathzer.soft.javaluator
Class Token
java.lang.Object
com.fathzer.soft.javaluator.Token
A token.
When evaluating an expression, it is first split into tokens. These tokens can be operators, constants, etc ...
When evaluating an expression, it is first split into tokens. These tokens can be operators, constants, etc ...
- Author:
- Jean-Marc Astesana
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether the token is a close bracket.booleanTests whether the token is a function.booleanTests whether the token is a function argument separator.booleanTests whether the token is a literal or a constant or a variable name.booleanTests whether the token is an open bracket.booleanTests whether the token is an operator.toString()
-
Method Details
-
isOperator
public boolean isOperator()Tests whether the token is an operator.- Returns:
- true if the token is an operator
-
isFunction
public boolean isFunction()Tests whether the token is a function.- Returns:
- true if the token is a function
-
isOpenBracket
public boolean isOpenBracket()Tests whether the token is an open bracket.- Returns:
- true if the token is an open bracket
-
isCloseBracket
public boolean isCloseBracket()Tests whether the token is a close bracket.- Returns:
- true if the token is a close bracket
-
isFunctionArgumentSeparator
public boolean isFunctionArgumentSeparator()Tests whether the token is a function argument separator.- Returns:
- true if the token is a function argument separator
-
isLiteral
public boolean isLiteral()Tests whether the token is a literal or a constant or a variable name.- Returns:
- true if the token is a literal, a constant or a variable name
-
toString
-