Class ViaInstruction

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

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

  • 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
    • getViaCount

      public int getViaCount()
    • setViaCount

      public void setViaCount(int count)
    • getTurnDescription

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