Class Token

java.lang.Object
com.yahoo.prelude.query.parser.Token

public class Token extends Object
A query token.
Author:
bratseth
  • Field Details

    • substring

      public final Substring substring
      The raw substring causing this token, never null
    • kind

      public final Token.Kind kind
    • image

      public final String image
      Lowercase image
  • Constructor Details

  • Method Details

    • isSpecial

      public boolean isSpecial()
      Returns whether this is a special token
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • getSubstring

      public Substring getSubstring()
      Returns the substring containing the image ins original form (including casing), as well as all the text surrounding the token
      Returns:
      the image in original casing, never null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object