public class Indication
extends java.lang.Object
RouteStep
to continue
the routeModifier and Type | Class and Description |
---|---|
static class |
Indication.Action
Defines the main action of the indication
|
static class |
Indication.Builder |
static class |
Indication.Orientation
Defines the change in orientation associated the the indication
|
Modifier and Type | Field and Description |
---|---|
static <any> |
CREATOR |
static Indication |
EMPTY |
static Indication |
END |
Constructor and Description |
---|
Indication(int stepIndex,
double orientationChange,
double distance,
int floorDistance)
Constructs Indication calculating its GuidanceActionType and GuidanceOrientationType
|
Modifier and Type | Method and Description |
---|---|
Indication |
chunk(Indication indication2)
Constructs a new
Indication form the current one and the provided indication2. |
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
double |
getDistance()
Retrieve the distance between the origin and destination
|
int |
getDistanceToNextLevel()
Retrieve the number of levels between the origin and destination
|
Indication.Action |
getIndicationType()
Retrieve the
Indication.Action of the instruction |
double |
getOrientation()
Retrieve the angle a user should change his direction in order to go from the origin
to the destination.
|
Indication.Orientation |
getOrientationType()
Retrieve the
Indication.Orientation of the instruction |
int |
getStepIdxDestination()
Retrieve the index of the indication's step of destination.
|
int |
getStepIdxOrigin()
Retrieve the index of the indication's step of origin
|
int |
hashCode() |
boolean |
isChunckableWith(Indication indication2)
Checks if this
Indication can be combined with another one |
boolean |
isNeededLevelChange()
Check if the user should change the level in order to arrive to destination
|
boolean |
isValid()
Check if a particular guidance make sense
|
void |
setDistance(double distance) |
java.lang.String |
toString() |
java.lang.String |
toText(Context context)
Get a natural language string describing the instruction in the language of the
Locale of the device (if translation available). |
java.lang.String |
toText(Context context,
java.util.Locale locale)
Get a natural language string describing the instruction.
|
void |
writeToParcel(Parcel dest,
int flags) |
public static final Indication EMPTY
public static final Indication END
public static final <any> CREATOR
public Indication(int stepIndex, double orientationChange, double distance, int floorDistance)
stepIndex
- index of the RouteStep
whose indication is being calculatedorientationChange
- angle in radians of change in orientation to follow the route (-pi,pi)distance
- distance of the RouteStep
from RouteStep.getDistance()
floorDistance:
- Distance between floors of points origin and destination of the RouteStep
public java.lang.String toString()
toString
in class java.lang.Object
public double getOrientation()
public Indication.Action getIndicationType()
Indication.Action
of the instructionIndication.Action
public Indication.Orientation getOrientationType()
Indication.Orientation
of the instructionIndication.Orientation
public double getDistance()
public boolean isNeededLevelChange()
public int getDistanceToNextLevel()
public void setDistance(double distance)
public int getStepIdxOrigin()
public int getStepIdxDestination()
public boolean isValid()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isChunckableWith(Indication indication2)
Indication
can be combined with another onepublic Indication chunk(Indication indication2)
Indication
form the current one and the provided indication2. It
should be check before if they are chunkable with the function isChunckableWith(Indication)
Indication
with parameters combinedpublic java.lang.String toText(Context context)
Locale
of the device (if translation available).
The default language is english.context
- public java.lang.String toText(Context context, java.util.Locale locale)
Locale
.
Finally, if neither of them is available, it will return in the default language (english)context
- locale
- Locale
of the desired languagepublic int describeContents()
public void writeToParcel(Parcel dest, int flags)