Skip to content

Commit

Permalink
Convert line comments to Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Sep 16, 2024
1 parent 8bdf6bc commit 6a06341
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
* <p>
* Itineraries matching the start(earliest-departure-time) are included and itineraries matching
* the end(latest-departure-time) are not. The filter is {@code [inclusive, exclusive]}.
* <p>
* For arrive by searches, the street/flex-only results are treated differently:
* Arrive-by transit result are filtered by their departure time and whether they don't depart
* after the end of the computed search window which is dependent on the heuristic's minimum
* transit time.
* This doesn't work because street/flex-only can be shorter than the transit ones and often
* end up time-shifted right up to the arrive by time.
* <p>
* <a href="https://github.com/opentripplanner/OpenTripPlanner/issues/6046">Further reading.</a>
*/
public class OutsideSearchWindowFilter implements RemoveItineraryFlagger {

Expand Down Expand Up @@ -42,13 +51,6 @@ public String name() {
public Predicate<Itinerary> shouldBeFlaggedForRemoval() {
return it -> {
var startTime = it.startTime().toInstant();
// for arrive by searches, the street/flex-only results are treated differently:
// arrive-by transit result are filtered by their departure time and whether they don't depart
// after the end of the computed search window which is dependent on the heuristic's minimum
// transit time.
// this doesn't work because street/flex-only can be shorter than the transit ones and often
// end up time-shifted right up to the arrive by time.
// further reading: https://github.com/opentripplanner/OpenTripPlanner/issues/6046
if (it.isOnStreetAndFlexOnly() && isArriveBy) {
return startTime.isBefore(earliestDepartureTime);
} else {
Expand Down

0 comments on commit 6a06341

Please sign in to comment.