Class Token

java.lang.Object
com.fathzer.soft.javaluator.Token

public class Token extends Object
A token.
When evaluating an expression, it is first split into tokens. These tokens can be operators, constants, etc ...
Author:
Jean-Marc Astesana
See Also:
  • 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

      public String toString()
      Overrides:
      toString in class Object