Step.Builder

public static final class Step.Builder
extends Object

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


Builder for creating a Step

Summary

Public constructors

Step.Builder()

Public methods

Step.Builder addLane(Lane lane)

Adds a road lane configuration to this step.

Step build()

Returns a Step built with the provided information.

Step.Builder setDistance(Distance distance)

Sets the maneuver to be performed on this step, or null if distance to this step is not provided.

Step.Builder setManeuver(Maneuver maneuver)

Sets the distance from the current position to the point where this navigation step should be executed, or null if this step doesn't involve a maneuver.

Inherited methods

Public constructors

Step.Builder

public Step.Builder ()

Public methods

addLane

public Step.Builder addLane (Lane lane)

Adds a road lane configuration to this step. Lanes should be added from left to right.

Parameters
lane Lane

Returns
Step.Builder this object for chaining

build

public Step build ()

Returns a Step built with the provided information.

Returns
Step

setDistance

public Step.Builder setDistance (Distance distance)

Sets the maneuver to be performed on this step, or null if distance to this step is not provided.

Parameters
distance Distance

Returns
Step.Builder this object for chaining

setManeuver

public Step.Builder setManeuver (Maneuver maneuver)

Sets the distance from the current position to the point where this navigation step should be executed, or null if this step doesn't involve a maneuver.

Parameters
maneuver Maneuver

Returns
Step.Builder this object for chaining