Maneuver

@CarProtocol
public final class Maneuver


Information about a maneuver that the driver will be required to perform.

Summary

Nested types

public final class Maneuver.Builder

A builder of Maneuver.

Constants

static final int

Starting point of the navigation.

static final int

Arrival at a destination.

static final int

Arrival to a destination located to the left side of the road.

static final int

Arrival to a destination located to the right side of the road.

static final int

Arrival to a destination located straight ahead.

static final int

Drive towards a boat ferry for vehicles, where the entrance is straight ahead or in an unknown direction.

static final int

Drive towards a boat ferry for vehicles, where the entrance is to the left.

static final int

Drive towards a boat ferry for vehicles, where the entrance is to the right.

static final int

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is straight ahead or in an unknown direction.

static final int

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the left.

static final int

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the right.

static final int

Keep to the left as the road diverges.

static final int

Keep to the right as the road diverges.

static final int

No turn, from 0 (included) to 10 (excluded) degrees.

static final int

No turn, from 0 (included) to 10 (excluded) degrees.

static final int

Current road joins another on the left.

static final int

Current road joins another on the right.

static final int

Current road joins another without direction specified.

static final int

No turn, but the street name changes.

static final int

A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

static final int

A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

static final int

A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

static final int

A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

static final int

Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

static final int

Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

static final int

Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

static final int

Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

static final int

Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

static final int

Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

static final int

Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

static final int

Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

static final int

Enter a counter-clockwise roundabout and take the Nth exit.

static final int

Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.

static final int

Enter a clockwise roundabout and take the Nth exit.

static final int

Enter a clockwise roundabout and take the Nth exit after angle A degrees.

static final int

Entrance to a counter-clockwise roundabout on which the current road ends.

static final int

Entrance to a clockwise roundabout on which the current road ends.

static final int

Used when leaving a counter-clockwise roundabout when the step starts in it.

static final int

Used when leaving a clockwise roundabout when the step starts in it.

static final int

Driver should steer straight.

static final int

Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.

static final int

Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.

static final int

Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.

static final int

Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.

static final int

Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.

static final int

Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.

static final int

Maneuver type is unknown, no maneuver information should be displayed.

static final int

Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

static final int

A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Public methods

boolean
@Nullable CarIcon

Returns the icon for the maneuver.

int

Returns the roundabout exit angle in degrees to designate the amount of distance to travel around the roundabout.

int

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

int

Returns the maneuver type.

int
@NonNull String

Constants

TYPE_DEPART

Added in 1.0.0
public static final int TYPE_DEPART = 1

Starting point of the navigation.

For example, "Start driving on Main St."

TYPE_DESTINATION

Added in 1.0.0
public static final int TYPE_DESTINATION = 39

Arrival at a destination.

TYPE_DESTINATION_LEFT

Added in 1.0.0
public static final int TYPE_DESTINATION_LEFT = 41

Arrival to a destination located to the left side of the road.

TYPE_DESTINATION_RIGHT

Added in 1.0.0
public static final int TYPE_DESTINATION_RIGHT = 42

Arrival to a destination located to the right side of the road.

TYPE_DESTINATION_STRAIGHT

Added in 1.0.0
public static final int TYPE_DESTINATION_STRAIGHT = 40

Arrival to a destination located straight ahead.

TYPE_FERRY_BOAT

Added in 1.0.0
public static final int TYPE_FERRY_BOAT = 37

Drive towards a boat ferry for vehicles, where the entrance is straight ahead or in an unknown direction.

For example, this is used to indicate "Take the ferry".

TYPE_FERRY_BOAT_LEFT

Added in 1.0.0
public static final int TYPE_FERRY_BOAT_LEFT = 47

Drive towards a boat ferry for vehicles, where the entrance is to the left.

For example, this is used to indicate "Take the ferry".

TYPE_FERRY_BOAT_RIGHT

Added in 1.0.0
public static final int TYPE_FERRY_BOAT_RIGHT = 48

Drive towards a boat ferry for vehicles, where the entrance is to the right.

For example, this is used to indicate "Take the ferry".

TYPE_FERRY_TRAIN

Added in 1.0.0
public static final int TYPE_FERRY_TRAIN = 38

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is straight ahead or in an unknown direction.

TYPE_FERRY_TRAIN_LEFT

Added in 1.0.0
public static final int TYPE_FERRY_TRAIN_LEFT = 49

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the left.

TYPE_FERRY_TRAIN_RIGHT

Added in 1.0.0
public static final int TYPE_FERRY_TRAIN_RIGHT = 50

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the right.

TYPE_FORK_LEFT

Added in 1.0.0
public static final int TYPE_FORK_LEFT = 25

Keep to the left as the road diverges.

For example, this is used to indicate "Keep left at the fork".

TYPE_FORK_RIGHT

Added in 1.0.0
public static final int TYPE_FORK_RIGHT = 26

Keep to the right as the road diverges.

For example, this is used to indicate "Keep right at the fork".

TYPE_KEEP_LEFT

Added in 1.0.0
public static final int TYPE_KEEP_LEFT = 3

No turn, from 0 (included) to 10 (excluded) degrees.

This is used in contrast to TYPE_STRAIGHT for disambiguating cases where there is more than one option to go into the same general direction.

TYPE_KEEP_RIGHT

Added in 1.0.0
public static final int TYPE_KEEP_RIGHT = 4

No turn, from 0 (included) to 10 (excluded) degrees.

This is used in contrast to TYPE_STRAIGHT for disambiguating cases where there is more than one option to go into the same general direction.

TYPE_MERGE_LEFT

Added in 1.0.0
public static final int TYPE_MERGE_LEFT = 27

Current road joins another on the left.

For example, this is used to indicate "Merge left onto Main St.".

TYPE_MERGE_RIGHT

Added in 1.0.0
public static final int TYPE_MERGE_RIGHT = 28

Current road joins another on the right.

For example, this is used to indicate "Merge left onto Main St.".

TYPE_MERGE_SIDE_UNSPECIFIED

Added in 1.0.0
public static final int TYPE_MERGE_SIDE_UNSPECIFIED = 29

Current road joins another without direction specified.

For example, this is used to indicate "Merge onto Main St.".

TYPE_NAME_CHANGE

Added in 1.0.0
public static final int TYPE_NAME_CHANGE = 2

No turn, but the street name changes.

For example, "Continue on Main St."

TYPE_OFF_RAMP_NORMAL_LEFT

Added in 1.0.0
public static final int TYPE_OFF_RAMP_NORMAL_LEFT = 23

A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

TYPE_OFF_RAMP_NORMAL_RIGHT

Added in 1.0.0
public static final int TYPE_OFF_RAMP_NORMAL_RIGHT = 24

A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

TYPE_OFF_RAMP_SLIGHT_LEFT

Added in 1.0.0
public static final int TYPE_OFF_RAMP_SLIGHT_LEFT = 21

A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

TYPE_OFF_RAMP_SLIGHT_RIGHT

Added in 1.0.0
public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT = 22

A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

TYPE_ON_RAMP_NORMAL_LEFT

Added in 1.0.0
public static final int TYPE_ON_RAMP_NORMAL_LEFT = 15

Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

TYPE_ON_RAMP_NORMAL_RIGHT

Added in 1.0.0
public static final int TYPE_ON_RAMP_NORMAL_RIGHT = 16

Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

TYPE_ON_RAMP_SHARP_LEFT

Added in 1.0.0
public static final int TYPE_ON_RAMP_SHARP_LEFT = 17

Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

TYPE_ON_RAMP_SHARP_RIGHT

Added in 1.0.0
public static final int TYPE_ON_RAMP_SHARP_RIGHT = 18

Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

TYPE_ON_RAMP_SLIGHT_LEFT

Added in 1.0.0
public static final int TYPE_ON_RAMP_SLIGHT_LEFT = 13

Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

TYPE_ON_RAMP_SLIGHT_RIGHT

Added in 1.0.0
public static final int TYPE_ON_RAMP_SLIGHT_RIGHT = 14

Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

TYPE_ON_RAMP_U_TURN_LEFT

Added in 1.0.0
public static final int TYPE_ON_RAMP_U_TURN_LEFT = 19

Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

TYPE_ON_RAMP_U_TURN_RIGHT

Added in 1.0.0
public static final int TYPE_ON_RAMP_U_TURN_RIGHT = 20

Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW = 34

Enter a counter-clockwise roundabout and take the Nth exit.

The exit number must be passed when created the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE = 35

Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.

The exit angle must be passed when creating the maneuver.

For example, this is used to indicate "At the roundabout, take a sharp right at 35 degrees".

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW = 32

Enter a clockwise roundabout and take the Nth exit.

The exit number must be passed when created the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE = 33

Enter a clockwise roundabout and take the Nth exit after angle A degrees.

The exit angle must be passed when creating the maneuver.

For example, this is used to indicate "At the roundabout, take the exit at 135 degrees".

TYPE_ROUNDABOUT_ENTER_CCW

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_ENTER_CCW = 45

Entrance to a counter-clockwise roundabout on which the current road ends.

For example, this is used to indicate "Enter the roundabout".

TYPE_ROUNDABOUT_ENTER_CW

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_ENTER_CW = 43

Entrance to a clockwise roundabout on which the current road ends.

For example, this is used to indicate "Enter the roundabout".

TYPE_ROUNDABOUT_EXIT_CCW

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_EXIT_CCW = 46

Used when leaving a counter-clockwise roundabout when the step starts in it.

For example, this is used to indicate "Exit the roundabout".

TYPE_ROUNDABOUT_EXIT_CW

Added in 1.0.0
public static final int TYPE_ROUNDABOUT_EXIT_CW = 44

Used when leaving a clockwise roundabout when the step starts in it.

For example, this is used to indicate "Exit the roundabout".

TYPE_STRAIGHT

Added in 1.0.0
public static final int TYPE_STRAIGHT = 36

Driver should steer straight.

TYPE_TURN_NORMAL_LEFT

Added in 1.0.0
public static final int TYPE_TURN_NORMAL_LEFT = 7

Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.

TYPE_TURN_NORMAL_RIGHT

Added in 1.0.0
public static final int TYPE_TURN_NORMAL_RIGHT = 8

Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.

TYPE_TURN_SHARP_LEFT

Added in 1.0.0
public static final int TYPE_TURN_SHARP_LEFT = 9

Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.

TYPE_TURN_SHARP_RIGHT

Added in 1.0.0
public static final int TYPE_TURN_SHARP_RIGHT = 10

Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.

TYPE_TURN_SLIGHT_LEFT

Added in 1.0.0
public static final int TYPE_TURN_SLIGHT_LEFT = 5

Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.

TYPE_TURN_SLIGHT_RIGHT

Added in 1.0.0
public static final int TYPE_TURN_SLIGHT_RIGHT = 6

Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.

TYPE_UNKNOWN

Added in 1.0.0
public static final int TYPE_UNKNOWN = 0

Maneuver type is unknown, no maneuver information should be displayed.

This type may be interpreted differently depending on the consumer. In some cases the previous maneuver will continue to be shown while in others no maneuver will be shown at all.

TYPE_U_TURN_LEFT

Added in 1.0.0
public static final int TYPE_U_TURN_LEFT = 11

Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

TYPE_U_TURN_RIGHT

Added in 1.0.0
public static final int TYPE_U_TURN_RIGHT = 12

A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Public methods

equals

Added in 1.4.0-rc02
public boolean equals(@Nullable Object other)

getIcon

Added in 1.0.0
public @Nullable CarIcon getIcon()

Returns the icon for the maneuver.

Optional field that when not set may be shown in the target display by a generic image representing the specific maneuver.

getRoundaboutExitAngle

Added in 1.0.0
public int getRoundaboutExitAngle()

Returns the roundabout exit angle in degrees to designate the amount of distance to travel around the roundabout. Only relevant if the type is TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE or TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE.

For example, if the drive is joining a counter-clockwise roundabout with equally spaced exits then the exit to the right would be at 90 degrees, the one straight ahead would be at 180 degrees, the one to the left would at 270 degrees and the one used by the driver to join the roundabout would be at 360 degrees.

The angle can also be set for irregular roundabouts. For example a roundabout with three exits at 90, 270 and 360 degrees could also have the desired exit angle specified.

Required with the type is a roundabout with an angle.

getRoundaboutExitNumber

Added in 1.0.0
public int getRoundaboutExitNumber()

Returns the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order. Only relevant if the type is any variation of TYPE_ROUNDABOUT_ENTER_AND_EXIT_*.

For example, if the driver is joining a counter-clockwise roundabout with 4 exits, then the exit to the right would be exit #1, the one straight ahead would be exit #2, the one to the left would be exit #3 and the one used by the driver to join the roundabout would be exit #4.

Required when the type is a roundabout.

getType

Added in 1.0.0
public int getType()

Returns the maneuver type.

Required to be set at all times.

hashCode

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()