V - Value type.public class Suggestion<V> extends Object
A suggestion contains the suggestion string itself, and optionally a score and payload when the FT.SUGGET command is called with WITHSCORES and/or WITHPAYLOADS options.
| Constructor and Description |
|---|
Suggestion(V value)
Create a new suggestion with only the value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
V |
getPayload()
Get the suggestion payload.
|
Double |
getScore()
Get the suggestion score.
|
V |
getValue()
Get the suggestion string.
|
int |
hashCode() |
boolean |
hasPayload()
Check if this suggestion has a payload.
|
boolean |
hasScore()
Check if this suggestion has a score.
|
String |
toString() |
public Suggestion(V value)
value - the suggestion stringpublic V getValue()
public Double getScore()
null if not availablepublic V getPayload()
null if not availablepublic boolean hasScore()
true if the suggestion has a scorepublic boolean hasPayload()
true if the suggestion has a payloadCopyright © 2025 lettuce.io. All rights reserved.