libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/routeprogress/RouteLegProgress.java
static RouteLegProgress create(RouteLeg routeLeg, int stepIndex, double legDistanceRemaining,
                                 double stepDistanceRemaining) {

    LegStep nextStep
      = stepIndex == (routeLeg.steps().size() - 1) ? null : routeLeg.steps().get(stepIndex + 1);

    RouteStepProgress stepProgress = RouteStepProgress.create(
      routeLeg.steps().get(stepIndex), nextStep, stepDistanceRemaining);
    return new AutoValue_RouteLegProgress(
      routeLeg, stepIndex, legDistanceRemaining, stepProgress);
  }
/**
   * Constructor for the route leg progress information.
   *
   * @param routeLeg            the current {@link RouteLeg} the user is traversing along
   * @param stepIndex           the current step index the user is on
   * @param legDistanceRemaining the leg distance remaining which is calculated in navigation engine
   * @param stepDistanceRemaining the step distance remaining which is calculated in navigation engine
   * @since 0.1.0
   */
Constructor for the route leg progress information.
Constructor for the route leg progress information .
static RouteLegProgress create(RouteLeg routeLeg, int stepIndex, double legDistanceRemaining,
                                 double stepDistanceRemaining) {
    LegStep nextStep
      = stepIndex == (routeLeg.steps().size() - 1) ? null : routeLeg.steps().get(stepIndex + 1);
    RouteStepProgress stepProgress = RouteStepProgress.create(
      routeLeg.steps().get(stepIndex), nextStep, stepDistanceRemaining);
    return new AutoValue_RouteLegProgress(
      routeLeg, stepIndex, legDistanceRemaining, stepProgress);
  }
static RouteLegProgress create ( RouteLeg routeLeg , int stepIndex , double legDistanceRemaining , double stepDistanceRemaining ) { LegStep nextStep = stepIndex == ( routeLeg . steps ( ) . size ( ) - 1 ) ? null : routeLeg . steps ( ) . get ( stepIndex + 1 ) ; RouteStepProgress stepProgress = RouteStepProgress . create ( routeLeg . steps ( ) . get ( stepIndex ) , nextStep , stepDistanceRemaining ) ; return new AutoValue_RouteLegProgress ( routeLeg , stepIndex , legDistanceRemaining , stepProgress ) ; }
Constructor for the route leg progress information.
Constructor for the route leg progress information .