Class CharToken

    • Constructor Detail

      • CharToken

        public CharToken​(int ch)
        Represents the given single-character token
    • Method Detail

      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class Object
        Returns:
        true iff o is a CharToken with same value
      • value

        public int value()
        Returns:
        the encapsulated value
      • toString

        public String toString()
        Description copied from class: Token
        Represents the token by its description
        Overrides:
        toString in class Token
        Returns:
        the token's description
      • isConstant

        public boolean isConstant()
        Description copied from class: Token
        Returns true if this token represents a constant, false otherwise
        Specified by:
        isConstant in class Token
        Returns:
        true iff this Token represents a constant
      • isFunction

        public boolean isFunction()
        Description copied from class: Token
        Returns true if this token represents a function, false otherwise
        Specified by:
        isFunction in class Token
        Returns:
        true iff this Token represents a function