LaneDirection.Builder

public static final class LaneDirection.Builder
extends Object

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


Builder for creating a LaneDirection

Summary

Public constructors

LaneDirection.Builder()

Public methods

LaneDirection build()

Returns a LaneDirection built with the provided information.

LaneDirection.Builder setHighlighted(boolean highlighted)

Sets whether this a direction the driver could take in order to stay in the navigation route.

LaneDirection.Builder setShape(LaneDirection.Shape shape, Shape... fallbacks)

Sets the LaneDirection.Shape of this lane direction, and any fallback values that could be used by the consumer if the shape is unknown to it.

Inherited methods

Public constructors

LaneDirection.Builder

public LaneDirection.Builder ()

Public methods

build

public LaneDirection build ()

Returns a LaneDirection built with the provided information.

Returns
LaneDirection

setHighlighted

public LaneDirection.Builder setHighlighted (boolean highlighted)

Sets whether this a direction the driver could take in order to stay in the navigation route.

Parameters
highlighted boolean: true if this is a recommended lane direction, or false otherwise.

Returns
LaneDirection.Builder this object for chaining

setShape

public LaneDirection.Builder setShape (LaneDirection.Shape shape, 
                Shape... fallbacks)

Sets the LaneDirection.Shape of this lane direction, and any fallback values that could be used by the consumer if the shape is unknown to it.

Parameters
shape LaneDirection.Shape: lane direction shape

fallbacks Shape: Variations of shape, in case the consumer of this API doesn't know the main one (used for backward compatibility).

Returns
LaneDirection.Builder this object for chaining