Builder

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

Builder for creating a Maneuver

Summary

Public constructors

Builder for creating a Maneuver

Public methods

Maneuver

Returns a Maneuver built with the provided information.

Maneuver.Builder
setIcon(@Nullable icon: ImageReference?)

Sets a reference to an image presenting this maneuver.

Maneuver.Builder
setRoundaboutExitNumber(roundaboutExitNumber: Int)

Sets the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order.

Maneuver.Builder
setType(@NonNull type: Maneuver.Type, @NonNull vararg fallbackTypes: Maneuver.Type!)

Sets the Type of maneuver, and any fallback values that could be used by the consumer if the type is unknown to it.

Public constructors

<init>

Builder()

Builder for creating a Maneuver

Public methods

build

@NonNull fun build(): Maneuver

Returns a Maneuver built with the provided information.

setIcon

@NonNull fun setIcon(@Nullable icon: ImageReference?): Maneuver.Builder

Sets a reference to an image presenting this maneuver. The provided image must be optimized to be presented in a square canvas (aspect ratio of 1:1).

setRoundaboutExitNumber

@NonNull fun setRoundaboutExitNumber(roundaboutExitNumber: Int): Maneuver.Builder

Sets the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order. Only relevant if getType() is Type#ROUNDABOUT_EXIT or any variation of ROUNDABOUT_ENTER_AND_EXIT.

Return
Maneuver.Builder: this object for chaining

setType

@NonNull fun setType(@NonNull type: Maneuver.Type, @NonNull vararg fallbackTypes: Maneuver.Type!): Maneuver.Builder

Sets the Type of maneuver, and any fallback values that could be used by the consumer if the type is unknown to it.

Parameters
type Maneuver.Type: Main maneuver type
fallbackTypes Maneuver.Type: Variations of type, in case the consumer of this API doesn't know the main one (used for backward compatibility). For example, if the main type is Type#OFF_RAMP_NORMAL_LEFT, a fallback type could be Type#TURN_NORMAL_LEFT.