Package com.graphhopper.util
Class FinishInstruction
java.lang.Object
com.graphhopper.util.Instruction
com.graphhopper.util.FinishInstruction
- Author:
- Peter Karich
-
Field Summary
Fields inherited from class com.graphhopper.util.Instruction
CONTINUE_ON_STREET, distance, extraInfo, FINISH, IGNORE, KEEP_LEFT, KEEP_RIGHT, LEAVE_ROUNDABOUT, name, points, PT_END_TRIP, PT_START_TRIP, PT_TRANSFER, rawName, REACHED_VIA, sign, time, TURN_LEFT, TURN_RIGHT, TURN_SHARP_LEFT, TURN_SHARP_RIGHT, TURN_SLIGHT_LEFT, TURN_SLIGHT_RIGHT, U_TURN_LEFT, U_TURN_RIGHT, U_TURN_UNKNOWN, UNKNOWN, USE_ROUNDABOUT
-
Constructor Summary
ConstructorsConstructorDescriptionFinishInstruction
(double lat, double lon, double ele) FinishInstruction
(PointAccess pointAccess, int node) FinishInstruction
(String name, double lat, double lon, double ele) FinishInstruction
(String name, PointAccess pointAccess, int node) -
Method Summary
Modifier and TypeMethodDescriptionint
This method returns the length of an Instruction.Methods inherited from class com.graphhopper.util.Instruction
getDistance, getExtraInfoJSON, getName, getPoints, getSign, getTime, setDistance, setExtraInfo, setName, setPoints, setSign, setTime, setUseRawName, toString
-
Constructor Details
-
FinishInstruction
-
FinishInstruction
public FinishInstruction(double lat, double lon, double ele) -
FinishInstruction
-
FinishInstruction
-
-
Method Details
-
getLength
public int getLength()Description copied from class:Instruction
This method returns the length of an Instruction. The length of an instruction is defined by [the index of the first point of the next instruction] - [the index of the first point of this instruction].In general this will just resolve to the size of the PointList, except for
ViaInstruction
andFinishInstruction
, which are only virtual instructions, in a sense that they don't provide a turn instruction, but only an info ("reached via point or destination").See #1216 and #1138
- Overrides:
getLength
in classInstruction
-
getTurnDescription
- Overrides:
getTurnDescription
in classInstruction
-