SearchResults
public interface SearchResults extends Closeable
Encapsulates results of a search operation.
Each search operation returns a list of SearchResult objects, referred to as a "page", limited by the size configured by setResultCountPerPage.
To fetch a page of results, call getNextPageAsync.
All instances of SearchResults must call close after the results are fetched.
This class is not thread safe.
Summary
Public methods |
|
|---|---|
abstract void |
close() |
abstract @NonNull ListenableFuture<List<SearchResult>> |
Retrieves the next page of |
Public methods
getNextPageAsync
abstract @NonNull ListenableFuture<List<SearchResult>> getNextPageAsync()
Retrieves the next page of SearchResult objects.
The page size is configured by setResultCountPerPage.
Continue calling this method to access results until it returns an empty list, signifying there are no more results.
| Returns | |
|---|---|
@NonNull ListenableFuture<List<SearchResult>> |
a |