NavigationState.Builder

public static final class NavigationState.Builder
extends Object

java.lang.Object
   ↳ androidx.car.cluster.navigation.NavigationState.Builder


Builder for creating a NavigationState

Summary

Public constructors

NavigationState.Builder()

Public methods

NavigationState.Builder addDestination(Destination destination)

Add a destination or intermediate stop in the navigation.

NavigationState.Builder addStep(Step step)

Add a navigation step.

NavigationState build()

Returns a NavigationState built with the provided information.

Inherited methods

Public constructors

public NavigationState.Builder ()

Public methods

addDestination

public NavigationState.Builder addDestination (Destination destination)

Add a destination or intermediate stop in the navigation. Destinations should be provided from nearest to furthest.

Parameters
destination Destination

Returns
NavigationState.Builder this object for chaining

addStep

public NavigationState.Builder addStep (Step step)

Add a navigation step. Steps should be provided in order of execution. It is up to the producer to decide how many steps in advance will be provided.

Parameters
step Step

Returns
NavigationState.Builder this object for chaining

build

public NavigationState build ()

Returns a NavigationState built with the provided information.

Returns
NavigationState