use of org.onebusaway.transit_data_federation.services.blocks.AbstractBlockTripIndex in project onebusaway-application-modules by camsys.
the class RouteBeanServiceImpl method getBlockTripsForIndicesMatchingRouteCollection.
/**
* A block index potentially includes trips with different routes. We only
* want the trips matching our route collection.
*
* @param <T>
* @param blockIndices
* @param routeCollectionId
* @param resultingTrips
*/
private <T extends AbstractBlockTripIndex> void getBlockTripsForIndicesMatchingRouteCollection(List<T> blockIndices, AgencyAndId routeCollectionId, List<BlockTripEntry> resultingTrips) {
for (AbstractBlockTripIndex blockIndex : blockIndices) {
for (BlockTripEntry blockTrip : blockIndex.getTrips()) {
TripEntry trip = blockTrip.getTrip();
AgencyAndId rcId = trip.getRouteCollection().getId();
if (!rcId.equals(routeCollectionId))
continue;
resultingTrips.add(blockTrip);
}
}
}
Aggregations