LaneDirection
public
final
class
LaneDirection
extends Object
java.lang.Object | |
↳ | com.google.android.libraries.car.app.navigation.model.LaneDirection |
Defines the possible directions a driver can go when using a particular lane at a particular step in the navigation.
These directions can be combined and sent to the host to display a lane configuration to the user.
Summary
Constants | |
---|---|
int |
SHAPE_NORMAL_LEFT
Regular left turn, from 45 (included) to 135 (excluded) degrees. |
int |
SHAPE_NORMAL_RIGHT
Regular right turn, from 45 (included) to 135 (excluded) degrees. |
int |
SHAPE_SHARP_LEFT
Sharp left turn, from 135 (included) to 175 (excluded) degrees. |
int |
SHAPE_SHARP_RIGHT
Sharp right turn, from 135 (included) to 175 (excluded) degrees. |
int |
SHAPE_SLIGHT_LEFT
Slight left turn, from 10 (included) to 45 (excluded) degrees. |
int |
SHAPE_SLIGHT_RIGHT
Slight right turn, from 10 (included) to 45 (excluded) degrees. |
int |
SHAPE_STRAIGHT
No turn. |
int |
SHAPE_UNKNOWN
The shape is unknown, in which case no lane information should be shown. |
int |
SHAPE_U_TURN_LEFT
A left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees |
int |
SHAPE_U_TURN_RIGHT
A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees |
Public methods | |
---|---|
static
LaneDirection
|
create(int shape, boolean isHighlighted)
Constructs a new instance of a |
boolean
|
equals(Object other)
|
int
|
getShape()
Returns shape of this lane direction. |
int
|
hashCode()
|
boolean
|
isHighlighted()
Returns whether this is a direction the driver should take in order to stay on the navigation route. |
String
|
toString()
|
Inherited methods | |
---|---|
Constants
SHAPE_NORMAL_LEFT
public static final int SHAPE_NORMAL_LEFT
Regular left turn, from 45 (included) to 135 (excluded) degrees.
Constant Value: 5 (0x00000005)
SHAPE_NORMAL_RIGHT
public static final int SHAPE_NORMAL_RIGHT
Regular right turn, from 45 (included) to 135 (excluded) degrees.
Constant Value: 6 (0x00000006)
SHAPE_SHARP_LEFT
public static final int SHAPE_SHARP_LEFT
Sharp left turn, from 135 (included) to 175 (excluded) degrees.
Constant Value: 7 (0x00000007)
SHAPE_SHARP_RIGHT
public static final int SHAPE_SHARP_RIGHT
Sharp right turn, from 135 (included) to 175 (excluded) degrees.
Constant Value: 8 (0x00000008)
SHAPE_SLIGHT_LEFT
public static final int SHAPE_SLIGHT_LEFT
Slight left turn, from 10 (included) to 45 (excluded) degrees.
Constant Value: 3 (0x00000003)
SHAPE_SLIGHT_RIGHT
public static final int SHAPE_SLIGHT_RIGHT
Slight right turn, from 10 (included) to 45 (excluded) degrees.
Constant Value: 4 (0x00000004)
SHAPE_STRAIGHT
public static final int SHAPE_STRAIGHT
No turn.
Constant Value: 2 (0x00000002)
SHAPE_UNKNOWN
public static final int SHAPE_UNKNOWN
The shape is unknown, in which case no lane information should be shown.
Constant Value: 1 (0x00000001)
SHAPE_U_TURN_LEFT
public static final int SHAPE_U_TURN_LEFT
A left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees
Constant Value: 9 (0x00000009)
SHAPE_U_TURN_RIGHT
public static final int SHAPE_U_TURN_RIGHT
A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees
Constant Value: 10 (0x0000000a)
Public methods
create
public static LaneDirection create (int shape, boolean isHighlighted)
Constructs a new instance of a LaneDirection
.
Parameters | |
---|---|
shape |
int : one of the SHAPE_* static constants defined in this class. |
isHighlighted |
boolean : indicates whether the LaneDirection is the one the driver should
take in order to stay on the navigation route.
|
Returns | |
---|---|
LaneDirection |
getShape
public int getShape ()
Returns shape of this lane direction.
Returns | |
---|---|
int |
hashCode
public int hashCode ()
Returns | |
---|---|
int |
isHighlighted
public boolean isHighlighted ()
Returns whether this is a direction the driver should take in order to stay on the navigation route.
Returns | |
---|---|
boolean |