public LocalTime getEndTimeForTrips ( Collection < Trip > trips ) { int latestArrival = Integer . MIN_VALUE ; for ( Trip trip : trips ) { StopTime st = feed . getOrderedStopTimesForTrip ( trip . trip_id ) . iterator ( ) . next ( ) ; if ( st . arrival_time >= latestArrival ) { latestArrival = st . arrival_time ; } } // return end time as 2:00 am if last arrival occurs after midnight return LocalTime . ofSecondOfDay ( latestArrival % 86399 ) ; }
Get last arrival time for a set of trips .