public List < Trip > getTripsForDate ( String stop_id , LocalDate date ) { List < String > tripIds = stats . getTripsForDate ( date ) . stream ( ) . map ( trip -> trip . trip_id ) . collect ( Collectors . toList ( ) ) ; return feed . getDistinctTripsForStop ( stop_id ) . stream ( ) . filter ( t -> tripIds . contains ( t . trip_id ) ) // filter by trip_id list for date . collect ( Collectors . toList ( ) ) ; }
Get list of trips that visit a stop for a specified date of service .