FindAutocompletePredictionsRequest

public abstract class FindAutocompletePredictionsRequest extends Object
implements Request

Nested Class Summary

class FindAutocompletePredictionsRequest.Builder Builder for FindAutocompletePredictionsRequest

Public Constructor Summary

Public Method Summary

static FindAutocompletePredictionsRequest.Builder
abstract CancellationToken
getCancellationToken()
Returns the CancellationToken used by PlacesClient to cancel any yet-to-be-executed requests.
abstract List<String>
getCountries()
Returns a list of countries to which results will be restricted.
String
getCountry()
Returns the country to which results will be restricted.
abstract LocationBias
getLocationBias()
Returns the location to which autocomplete predictions will be biased.
abstract LocationRestriction
getLocationRestriction()
Returns the location to which autocomplete predictions will be restricted.
abstract LatLng
getOrigin()
Returns the location where getDistanceMeters() is calculated from.
abstract String
getQuery()
Returns the query string for which the autocomplete predictions are to be fetched.
abstract AutocompleteSessionToken
getSessionToken()
Returns the AutocompleteSessionToken used for sessionizing multiple instances of FindAutocompletePredictionsRequest.
abstract TypeFilter
getTypeFilter()
Returns the filter used to restrict the type of the results returned.
static FindAutocompletePredictionsRequest

Inherited Method Summary

Public Constructors

public FindAutocompletePredictionsRequest ()

Public Methods

public abstract CancellationToken getCancellationToken ()

Returns the CancellationToken used by PlacesClient to cancel any yet-to-be-executed requests.

public abstract List<String> getCountries ()

Returns a list of countries to which results will be restricted.

These countries should be a ISO 3166-1 Alpha-2 country codes (case insensitive). If empty, no country filtering will take place.

public String getCountry ()

Returns the country to which results will be restricted.

This should be a ISO 3166-1 Alpha-2 country code (case insensitive). If null or empty, no country filtering will take place.

Throws
UnsupportedOperationException if multiple countries were set on this request.

public abstract LocationBias getLocationBias ()

Returns the location to which autocomplete predictions will be biased. If null, no location biases will be imposed.

public abstract LocationRestriction getLocationRestriction ()

Returns the location to which autocomplete predictions will be restricted. If null, no location restrictions will be imposed.

public abstract LatLng getOrigin ()

Returns the location where getDistanceMeters() is calculated from. If null, no distances will be returned.

public abstract String getQuery ()

Returns the query string for which the autocomplete predictions are to be fetched. If null or empty, no predictions will be returned.

public abstract AutocompleteSessionToken getSessionToken ()

Returns the AutocompleteSessionToken used for sessionizing multiple instances of FindAutocompletePredictionsRequest.

public abstract TypeFilter getTypeFilter ()

Returns the filter used to restrict the type of the results returned.

public static FindAutocompletePredictionsRequest newInstance (String query)

Parameters
query