Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

Maneuver.Builder

public static final class Maneuver.Builder
extends Object

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


Builder for creating a Maneuver

Summary

Public constructors

Maneuver.Builder()

Public methods

Maneuver build()

Returns a Maneuver built with the provided information.

Maneuver.Builder setRoundaboutExitNumber(int roundaboutExitNumber)

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(Maneuver.Type type, Type... fallbackTypes)

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

Inherited methods

Public constructors

Maneuver.Builder

public Maneuver.Builder ()

Public methods

build

public Maneuver build ()

Returns a Maneuver built with the provided information.

Returns
Maneuver

setRoundaboutExitNumber

public Maneuver.Builder setRoundaboutExitNumber (int roundaboutExitNumber)

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 Maneuver.getType() is Maneuver.Type.ROUNDABOUT_EXIT or any variation of ROUNDABOUT_ENTER_AND_EXIT.

Parameters
roundaboutExitNumber int

Returns
Maneuver.Builder this object for chaining

setType

public Maneuver.Builder setType (Maneuver.Type type, 
                Type... fallbackTypes)

Sets the Maneuver.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 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 Maneuver.Type.OFF_RAMP_NORMAL_LEFT, a fallback type could be Maneuver.Type.TURN_NORMAL_LEFT.

Returns
Maneuver.Builder