public Iterable < StopTime > getOrderedStopTimesForTrip ( String trip_id ) { Map < Fun . Tuple2 , StopTime > tripStopTimes = stop_times . subMap ( Fun . t2 ( trip_id , null ) , Fun . t2 ( trip_id , Fun . HI ) ) ; return tripStopTimes . values ( ) ; }
For the given trip ID fetch all the stop times in order of increasing stop_sequence . This is an efficient iteration over a tree map .