Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

Builder

class Builder
kotlin.Any
   ↳ androidx.car.cluster.navigation.Destination.Builder

Builder for creating a Destination

Summary

Public constructors

Builder for creating a Destination

Public methods
Destination.Builder
setAddress(@NonNull address: String)

Sets the destination address (formatted for the current user's locale), or empty if there is no address associated with this destination.

Destination.Builder
setTraffic(@NonNull traffic: Destination.Traffic, @NonNull vararg fallbacks: Destination.Traffic!)

Sets the congestion level to this destination, compared to ideal driving conditions.

Destination.Builder
setTitle(@NonNull title: String)

Sets the destination title (formatted for the current user's locale), or empty if there is no title associated with this destination.

Destination.Builder
setDistance(@Nullable distance: Distance?)

Sets the distance from the current position to this destination, or null if distance is unknown.

Destination.Builder
setEta(@Nullable eta: ZonedDateTime?)

Sets the estimated time of arrival to this destination, or null if estimated time of arrival is unknown.

Destination.Builder
setLocation(@Nullable latlng: LatLng?)

Sets the geo-location of this destination, or null if location is unknown.

Destination

Returns a Destination built with the provided information.

Public constructors

<init>

Builder()

Builder for creating a Destination

Public methods

setAddress

@NonNull fun setAddress(@NonNull address: String): Destination.Builder

Sets the destination address (formatted for the current user's locale), or empty if there is no address associated with this destination.

Return
Destination.Builder: this object for chaining

setTraffic

@NonNull fun setTraffic(@NonNull traffic: Destination.Traffic, @NonNull vararg fallbacks: Destination.Traffic!): Destination.Builder

Sets the congestion level to this destination, compared to ideal driving conditions.

Parameters
traffic Destination.Traffic: traffic level
fallbacks Destination.Traffic: Variations of traffic, in case the consumer of this API doesn't support the main one (used for backward compatibility).
Return
Destination.Builder: this object for chaining

setTitle

@NonNull fun setTitle(@NonNull title: String): Destination.Builder

Sets the destination title (formatted for the current user's locale), or empty if there is no title associated with this destination.

Return
Destination.Builder: this object for chaining

setDistance

@NonNull fun setDistance(@Nullable distance: Distance?): Destination.Builder

Sets the distance from the current position to this destination, or null if distance is unknown.

Return
Destination.Builder: this object for chaining

setEta

@NonNull fun setEta(@Nullable eta: ZonedDateTime?): Destination.Builder

Sets the estimated time of arrival to this destination, or null if estimated time of arrival is unknown.

Return
Destination.Builder: this object for chaining

setLocation

@NonNull fun setLocation(@Nullable latlng: LatLng?): Destination.Builder

Sets the geo-location of this destination, or null if location is unknown.

Return
Destination.Builder: this object for chaining

build

@NonNull fun build(): Destination

Returns a Destination built with the provided information.