Package com.google.gwt.user.client.ui
Class SuggestOracle.Response
java.lang.Object
com.google.gwt.user.client.ui.SuggestOracle.Response
- All Implemented Interfaces:
IsSerializable
- Enclosing class:
- SuggestOracle
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 Summary
ConstructorsConstructorDescriptionResponse()Constructor forSuggestOracle.Response.Response(Collection<? extends SuggestOracle.Suggestion> suggestions) Constructor forSuggestOracle.Response. -
Method Summary
Modifier and TypeMethodDescriptionintGets how many more suggestions there are.Collection<? extends SuggestOracle.Suggestion>Gets the collection of suggestions.booleanGets whether or not the suggestion list was truncated due to theSuggestOracle.Request.getLimit().voidsetMoreSuggestions(boolean moreSuggestions) Sets whether or not the suggestion list was truncated due to theSuggestOracle.Request.getLimit().voidsetMoreSuggestionsCount(int count) Sets whether or not the suggestion list was truncated due to theSuggestOracle.Request.getLimit(), by providing an exact count of remaining suggestions.voidsetSuggestions(Collection<? extends SuggestOracle.Suggestion> suggestions) Sets the suggestions for this response.
-
Constructor Details
-
Response
public Response()Constructor forSuggestOracle.Response. -
Response
Constructor forSuggestOracle.Response.- Parameters:
suggestions- each element of suggestions must implement theSuggestOracle.Suggestioninterface
-
-
Method Details
-
getMoreSuggestionsCount
public int getMoreSuggestionsCount()Gets how many more suggestions there are.- Returns:
- the count. if there no more suggestions or the number of more suggestions is unknown, returns 0.
-
getSuggestions
Gets the collection of suggestions. Each suggestion must implement theSuggestOracle.Suggestioninterface.- Returns:
- the collection of suggestions
-
hasMoreSuggestions
public boolean hasMoreSuggestions()Gets whether or not the suggestion list was truncated due to theSuggestOracle.Request.getLimit(). -
setMoreSuggestions
public void setMoreSuggestions(boolean moreSuggestions) Sets whether or not the suggestion list was truncated due to theSuggestOracle.Request.getLimit(). -
setMoreSuggestionsCount
public void setMoreSuggestionsCount(int count) Sets whether or not the suggestion list was truncated due to theSuggestOracle.Request.getLimit(), by providing an exact count of remaining suggestions.- Parameters:
count- number of truncated suggestions. Pass 0 to indicate there are no other suggestions, which is equivalent tosetMoreSuggestions(false).
-
setSuggestions
Sets the suggestions for this response. Each suggestion must implement theSuggestOracle.Suggestioninterface.- Parameters:
suggestions- the suggestions
-