Skip to content

Commit

Permalink
review: Apply suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Nov 30, 2023
1 parent 7d052cb commit 15c87b4
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 31 deletions.
46 changes: 23 additions & 23 deletions docs/Configuration.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
*/
public class ModifiedTripBuilder {

private static final Logger LOG = LoggerFactory.getLogger(TimetableHelper.class);
private static final Logger LOG = LoggerFactory.getLogger(ModifiedTripBuilder.class);

private final TripTimes existingTripTimes;
private final TripPattern pattern;
private final LocalDate serviceDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public ApiTripPlan mapTripPlan(TripPlan domain) {
}
ApiTripPlan api = new ApiTripPlan();
api.date = Date.from(domain.date);
// The origin/destination do not have arrival/depature times; Hence {@code null} is used.
// The origin/destination do not have arrival/departure times; Hence {@code null} is used.
api.from = placeMapper.mapPlace(domain.from, null, null, null, null);
api.to = placeMapper.mapPlace(domain.to, null, null, null, null);
api.itineraries = itineraryMapper.mapItineraries(domain.itineraries);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ moving on to the next.
request to the next page. **sw'** is the search window for the new next/previous page. The search
window may change between requests, so we need to account for it when computing the next/previous
page cursors.
- **earliest-departure-time (edt)** The search-window start with the earliest-depature-time, which
- **earliest-departure-time (edt)** The search-window start with the earliest-departure-time, which
is the first possible time any itinerary may start. **edt'** is the calculated value for the new
cursor.
- **latest-arrival-time (lat)** The latest time an itinerary can arrive to get accepted. The
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private org.opentripplanner.transit.model.network.Route lookupRoute(
private void createTripTimes(List<Trip> trips, TripPattern tripPattern) {
for (Trip trip : trips) {
List<StopTime> stopTimes = result.tripStopTimes.get(trip);
if (stopTimes.size() == 0) {
if (stopTimes.isEmpty()) {
issueStore.add(
"TripWithoutTripTimes",
"Trip %s does not contain any trip times.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public enum ConfigType {
TIME_PENALTY(
JsonType.string,
"""
A time-penalty is used to add a penalty to the duration/arrival-time/depature-time for
A time-penalty is used to add a penalty to the duration/arrival-time/departure-time for
a path. It will be invisible to the end user, but used during the routing when comparing
stop-arrival/paths.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
import org.opentripplanner.transit.model.framework.Deduplicator;
import org.opentripplanner.transit.model.framework.DeduplicatorService;

/**
* Regular/planed/scheduled read-only version of {@link TripTimes}. The set of static
* trip-times are build during graph-build and can not be changed using real-time updates.
*
* @see RealTimeTripTimes for real-time version
*/
public final class ScheduledTripTimes implements TripTimes {

/**
Expand Down Expand Up @@ -318,7 +324,7 @@ private void validate() {
/**
* When creating scheduled trip times we could potentially imply negative running or dwell times.
* We really don't want those being used in routing. This method checks that all times are
* increasing. The first stop arrival time and the last stops depature time is NOT checked -
* increasing. The first stop arrival time and the last stops departure time is NOT checked -
* these should be ignored by raptor.
*/
private void validateNonIncreasingTimes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface TripTimes extends Serializable, Comparable<TripTimes> {
/**
* Copy scheduled times, but not the actual times.
*/
public RealTimeTripTimes copyScheduledTimes();
RealTimeTripTimes copyScheduledTimes();

/** The code for the service on which this trip runs. For departure search optimizations. */
int getServiceCode();
Expand Down Expand Up @@ -59,7 +59,7 @@ public interface TripTimes extends Serializable, Comparable<TripTimes> {
int getDepartureDelay(int stop);

/**
* Whether or not stopIndex is considered a GTFS timepoint.
* Whether stopIndex is considered a GTFS timepoint.
*/
boolean isTimepoint(int stopIndex);

Expand Down

0 comments on commit 15c87b4

Please sign in to comment.