Class Token


  • public final class Token
    extends Object
    Token produced by QueryLexer.
    • Constructor Detail

      • Token

        public Token​(Token.TokenType type,
                     String value,
                     int position)
        Creates a token.
        Parameters:
        type - the token kind
        value - the matched text, or null if the kind carries none
        position - the character offset where the token starts
    • Method Detail

      • value

        public String value()
        Returns:
        the matched text, or null for tokens that carry none
      • position

        public int position()
        Returns:
        the character offset where the token starts
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object