public static class SuggestOracle.Response extends java.lang.Object implements IsSerializable
SuggestOracle
response.
Can optionally have truncation information provided. To indicate that there are more results but the number is not known, use:
response.setMoreSuggestions(true);
Or to indicate more results with an exact number, use:
response.setMoreSuggestionsCount(102);
Constructor and Description |
---|
Response()
Constructor for
SuggestOracle.Response . |
Response(java.util.Collection<? extends SuggestOracle.Suggestion> suggestions)
Constructor for
SuggestOracle.Response . |
Modifier and Type | Method and Description |
---|---|
int |
getMoreSuggestionsCount()
Gets how many more suggestions there are.
|
java.util.Collection<? extends SuggestOracle.Suggestion> |
getSuggestions()
Gets the collection of suggestions.
|
boolean |
hasMoreSuggestions()
Gets whether or not the suggestion list was truncated due to the
SuggestOracle.Request.getLimit() . |
void |
setMoreSuggestions(boolean moreSuggestions)
Sets whether or not the suggestion list was truncated due to the
SuggestOracle.Request.getLimit() . |
void |
setMoreSuggestionsCount(int count)
Sets whether or not the suggestion list was truncated due to the
SuggestOracle.Request.getLimit() , by providing an exact count of remaining
suggestions. |
void |
setSuggestions(java.util.Collection<? extends SuggestOracle.Suggestion> suggestions)
Sets the suggestions for this response.
|
public Response()
SuggestOracle.Response
.public Response(java.util.Collection<? extends SuggestOracle.Suggestion> suggestions)
SuggestOracle.Response
.suggestions
- each element of suggestions must implement the
SuggestOracle.Suggestion
interfacepublic int getMoreSuggestionsCount()
public java.util.Collection<? extends SuggestOracle.Suggestion> getSuggestions()
SuggestOracle.Suggestion
interface.public boolean hasMoreSuggestions()
SuggestOracle.Request.getLimit()
.public void setMoreSuggestions(boolean moreSuggestions)
SuggestOracle.Request.getLimit()
.public void setMoreSuggestionsCount(int count)
SuggestOracle.Request.getLimit()
, by providing an exact count of remaining
suggestions.count
- number of truncated suggestions. Pass 0 to indicate there
are no other suggestions, which is equivalent to
setMoreSuggestions(false)
.public void setSuggestions(java.util.Collection<? extends SuggestOracle.Suggestion> suggestions)
SuggestOracle.Suggestion
interface.suggestions
- the suggestions