Package com.yahoo.prelude.query.parser
Class Token
java.lang.Object
com.yahoo.prelude.query.parser.Token
A query token.
- Author:
- bratseth
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionToken
(Token.Kind kind, String image) Crates a token which fails to know its origin (as a substring).Token
(Token.Kind kind, String image, boolean special, Substring substring) Token
(Token.Kind kind, String image, Substring substring) -
Method Summary
-
Field Details
-
substring
The raw substring causing this token, never null -
kind
-
image
Lowercase image
-
-
Constructor Details
-
Token
Crates a token which fails to know its origin (as a substring). Do not use, except for testing. -
Token
-
Token
-
-
Method Details
-
isSpecial
public boolean isSpecial()Returns whether this is a special token -
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
-
toString
-
equals
-
hashCode
public int hashCode()
-