Class FinishInstruction

java.lang.Object
com.graphhopper.util.Instruction
com.graphhopper.util.FinishInstruction

public class FinishInstruction extends Instruction
Author:
Peter Karich
  • Constructor Details

    • FinishInstruction

      public FinishInstruction(String name, double lat, double lon, double ele)
    • FinishInstruction

      public FinishInstruction(double lat, double lon, double ele)
    • FinishInstruction

      public FinishInstruction(String name, PointAccess pointAccess, int node)
    • FinishInstruction

      public FinishInstruction(PointAccess pointAccess, int node)
  • 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 and FinishInstruction, 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 class Instruction
    • getTurnDescription

      public String getTurnDescription(Translation tr)
      Overrides:
      getTurnDescription in class Instruction