Builder

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

Builder for creating a NavigationState

Summary

Public constructors

Builder for creating a NavigationState

Public methods
NavigationState.Builder
addDestination(@NonNull destination: Destination)

Add a destination or intermediate stop in the navigation.

NavigationState.Builder
addStep(@NonNull step: Step)

Add a navigation step.

NavigationState

Returns a NavigationState built with the provided information.

Public constructors

<init>

Builder()

Builder for creating a NavigationState

Public methods

addDestination

@NonNull fun addDestination(@NonNull destination: Destination): NavigationState.Builder

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

Return
NavigationState.Builder: this object for chaining

addStep

@NonNull fun addStep(@NonNull step: Step): NavigationState.Builder

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.

Return
NavigationState.Builder: this object for chaining

build

@NonNull fun build(): NavigationState

Returns a NavigationState built with the provided information.