use of org.onebusaway.presentation.impl.AgencyAndRouteComparator in project onebusaway-application-modules by camsys.
the class RouteListServiceImpl method getRoutes.
@Override
public List<RouteBean> getRoutes() {
List<RouteBean> allRoutes = new ArrayList<RouteBean>();
List<AgencyWithCoverageBean> agencies = _transitDataService.getAgenciesWithCoverage();
for (AgencyWithCoverageBean agency : agencies) {
allRoutes.addAll(_transitDataService.getRoutesForAgencyId(agency.getAgency().getId()).getList());
}
Collections.sort(allRoutes, (getShowAgencyNames() ? new AgencyAndRouteComparator() : new RouteComparator()));
return allRoutes;
}
Aggregations