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
abstract @NonNull ListenableFuture<List<SearchResult>>

Retrieves the next page of SearchResult objects.

Public methods

close

Added in 1.1.0-alpha04
abstract void close()

getNextPageAsync

Added in 1.1.0-alpha04
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 ListenableFuture which resolves to a list of SearchResult objects.