public final class

Destination.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.car.cluster.navigation.Destination.Builder

Overview

Builder for creating a Destination

Summary

Constructors
publicBuilder()

Methods
public Destinationbuild()

Returns a Destination built with the provided information.

public Destination.BuildersetAddress(java.lang.String address)

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

public Destination.BuildersetDistance(Distance distance)

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

public Destination.BuildersetEta(java.time.ZonedDateTime eta)

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

public Destination.BuildersetLocation(LatLng latlng)

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

public Destination.BuildersetTitle(java.lang.String title)

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

public Destination.BuildersetTraffic(Destination.Traffic traffic, Destination.Traffic fallbacks[])

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public Destination.Builder setTitle(java.lang.String title)

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

Returns:

this object for chaining

public Destination.Builder setAddress(java.lang.String address)

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

Returns:

this object for chaining

public Destination.Builder setDistance(Distance distance)

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

Returns:

this object for chaining

public Destination.Builder setEta(java.time.ZonedDateTime eta)

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

Returns:

this object for chaining

public Destination.Builder setLocation(LatLng latlng)

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

Returns:

this object for chaining

public Destination.Builder setTraffic(Destination.Traffic traffic, Destination.Traffic fallbacks[])

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

Parameters:

traffic: traffic level
fallbacks: Variations of traffic, in case the consumer of this API doesn't support the main one (used for backward compatibility).

Returns:

this object for chaining

public Destination build()

Returns a Destination built with the provided information.