package com.conveyal.r5.profile.entur.api;


/**
 * Encapsulate information about a stop arrival, including the stop index and time to get there.
 * The information about the denature place (stop or location) is given by the context and not part of the class.
 */
public interface StopArrival {

    /** The destination stop */
    int stop();

    /** The time duration to reach the stop in seconds. This is just the time from the
     * previous place to this stop, not the entire duration from the journey origin. */
    int durationInSeconds();

    /**
     * The additional cost to be added to the pareto vector.
     * Optional - this method is only needed if the the cost is part of the pareto set.
     */
    default int cost() {
        return 0;
    };
}

@@ -89,16 +89,25 @@
  arrival
+ (or leg)
 , includ
@@ -137,201 +137,546 @@
 time
- to get there.%0A * The information about the denature place (stop or location) is given by the context and not part of the class.%0A */%0Apublic interface StopArrival %7B%0A%0A    /** The destination stop
+. What the information%0A * represent depend on the context.%0A * %3Cp/%3E%0A * The class is used to describe:%0A * %3Col%3E%0A *     %3Cli%3E assess legs%0A *     %3Cli%3E transfer legs%0A *     %3Cli%3E egress legs%0A * %3C/ol%3E%0A * Note that the %7B@link #stop()%7D refer to the destination stop in the 2 first cases, and the departure stop for egress legs.%0A *%0A *%0A */%0Apublic interface StopArrival %7B%0A%0A    /**%0A     * For an %3Cem%3Eassess legs%3C/em%3E or %3Cem%3Etransfer legs%3C/em%3E this is the arrival stop.%0A     * %3Cp/%3E%0A     * For an %3Cem%3Eegress legs%3C/em%3E this is the legs departure stop.%0A    
  */%0A
@@ -699,16 +699,23 @@
 %0A    /**
+%0A     *
  The tim
@@ -732,22 +732,30 @@
  to 
-reach
+walk or travel
  the 
-stop
+leg
  in 
@@ -774,67 +774,8 @@
 s is
- just the time from the%0A     * previous place to this stop,
  not
@@ -819,16 +819,21 @@
  origin.
+%0A    
  */%0A    

Update JavaDoc for StopArrival.