public static class

SuggestOracle.Response

extends Object
implements IsSerializable
java.lang.Object
   ↳ com.google.gwt.user.client.ui.SuggestOracle.Response

Class Overview

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);

Summary

Public Constructors
SuggestOracle.Response()
Constructor for SuggestOracle.Response.
SuggestOracle.Response(Collection<? extends SuggestOracle.Suggestion> suggestions)
Constructor for SuggestOracle.Response.
Public Methods
int getMoreSuggestionsCount()
Gets how many more suggestions there are.
Collection<? extends SuggestOracle.Suggestion> getSuggestions()
Gets the collection of suggestions.
boolean hasMoreSuggestions()
Gets whether or not the suggestion list was truncated due to the getLimit().
void setMoreSuggestions(boolean moreSuggestions)
Sets whether or not the suggestion list was truncated due to the getLimit().
void setMoreSuggestionsCount(int count)
Sets whether or not the suggestion list was truncated due to the getLimit(), by providing an exact count of remaining suggestions.
void setSuggestions(Collection<? extends SuggestOracle.Suggestion> suggestions)
Sets the suggestions for this response.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SuggestOracle.Response ()

Constructor for SuggestOracle.Response.

public SuggestOracle.Response (Collection<? extends SuggestOracle.Suggestion> suggestions)

Constructor for SuggestOracle.Response.

Parameters
suggestions each element of suggestions must implement the SuggestOracle.Suggestion interface

Public Methods

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.

public Collection<? extends SuggestOracle.Suggestion> getSuggestions ()

Gets the collection of suggestions. Each suggestion must implement the SuggestOracle.Suggestion interface.

Returns
  • the collection of suggestions

public boolean hasMoreSuggestions ()

Gets whether or not the suggestion list was truncated due to the getLimit().

public void setMoreSuggestions (boolean moreSuggestions)

Sets whether or not the suggestion list was truncated due to the getLimit().

public void setMoreSuggestionsCount (int count)

Sets whether or not the suggestion list was truncated due to the 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 to setMoreSuggestions(false).

public void setSuggestions (Collection<? extends SuggestOracle.Suggestion> suggestions)

Sets the suggestions for this response. Each suggestion must implement the SuggestOracle.Suggestion interface.

Parameters
suggestions the suggestions