/**** * Private Methods ****/ private void ensureCalendarDatesByServiceIdRelation() { if (_calendarDatesByServiceId == null) { _calendarDatesByServiceId = mapToValueList(getAllCalendarDates(), "serviceId", AgencyAndId.class); } }
/**** * Private Methods ****/ private void ensureCalendarDatesByServiceIdRelation() { if (_calendarDatesByServiceId == null) { _calendarDatesByServiceId = mapToValueList(getAllCalendarDates(), "serviceId", AgencyAndId.class); } }
private void ensureCalendarsByServiceIdRelation() { if (_calendarsByServiceId == null) { _calendarsByServiceId = mapToValueList(getAllCalendars(), "serviceId", AgencyAndId.class); } }
private void ensureShapePointRelation() { if (_shapePointsByShapeId == null) { _shapePointsByShapeId = mapToValueList(getAllShapePoints(), "shapeId", AgencyAndId.class); for (List<ShapePoint> shapePoints : _shapePointsByShapeId.values()) Collections.sort(shapePoints); } }
private void ensureShapePointRelation() { if (_shapePointsByShapeId == null) { _shapePointsByShapeId = mapToValueList(getAllShapePoints(), "shapeId", AgencyAndId.class); for (List<ShapePoint> shapePoints : _shapePointsByShapeId.values()) Collections.sort(shapePoints); } }
@Override public List<StopTime> getStopTimesForTrip(Trip trip) { if (_stopTimesByTrip == null) { _stopTimesByTrip = mapToValueList(getAllStopTimes(), "trip", Trip.class); for (List<StopTime> stopTimes : _stopTimesByTrip.values()) Collections.sort(stopTimes); } return list(_stopTimesByTrip.get(trip)); }
@Override public List<StopTime> getStopTimesForTrip(Trip trip) { if (_stopTimesByTrip == null) { _stopTimesByTrip = mapToValueList(getAllStopTimes(), "trip", Trip.class); for (List<StopTime> stopTimes : _stopTimesByTrip.values()) Collections.sort(stopTimes); } return list(_stopTimesByTrip.get(trip)); }
@Override public List<StopTime> getStopTimesForStop(Stop stop) { if (_stopTimesByStop == null) _stopTimesByStop = mapToValueList(getAllStopTimes(), "stop", Stop.class); return list(_stopTimesByStop.get(stop)); }
@Override public List<Trip> getTripsForShapeId(AgencyAndId shapeId) { if (_tripsByShapeId == null) { _tripsByShapeId = mapToValueList(getAllTrips(), "shapeId", AgencyAndId.class); } return list(_tripsByShapeId.get(shapeId)); }
@Override public List<Route> getRoutesForAgency(Agency agency) { if (_routesByAgency == null) _routesByAgency = mapToValueList(getAllRoutes(), "agency", Agency.class); return list(_routesByAgency.get(agency)); }
@Override public List<Trip> getTripsForShapeId(AgencyAndId shapeId) { if (_tripsByShapeId == null) { _tripsByShapeId = mapToValueList(getAllTrips(), "shapeId", AgencyAndId.class); } return list(_tripsByShapeId.get(shapeId)); }
@Override public List<Frequency> getFrequenciesForTrip(Trip trip) { if (_frequenciesByTrip == null) _frequenciesByTrip = mapToValueList(getAllFrequencies(), "trip", Trip.class); return list(_frequenciesByTrip.get(trip)); }
@Override public List<FareRule> getFareRulesForFareAttribute(FareAttribute fareAttribute) { if (_fareRulesByFareAttribute == null) { _fareRulesByFareAttribute = mapToValueList(getAllFareRules(), "fare", FareAttribute.class); } return list(_fareRulesByFareAttribute.get(fareAttribute)); }
@Override public List<Trip> getTripsForRoute(Route route) { if (_tripsByRoute == null) _tripsByRoute = mapToValueList(getAllTrips(), "route", Route.class); return list(_tripsByRoute.get(route)); }
@Override public List<Trip> getTripsForServiceId(AgencyAndId serviceId) { if (_tripsByServiceId == null) { _tripsByServiceId = mapToValueList(getAllTrips(), "serviceId", AgencyAndId.class); } return list(_tripsByServiceId.get(serviceId)); }
@Override public List<Route> getRoutesForAgency(Agency agency) { if (_routesByAgency == null) _routesByAgency = mapToValueList(getAllRoutes(), "agency", Agency.class); return list(_routesByAgency.get(agency)); }
@Override public List<Frequency> getFrequenciesForTrip(Trip trip) { if (_frequenciesByTrip == null) _frequenciesByTrip = mapToValueList(getAllFrequencies(), "trip", Trip.class); return list(_frequenciesByTrip.get(trip)); }
@Override public List<FareRule> getFareRulesForFareAttribute(FareAttribute fareAttribute) { if (_fareRulesByFareAttribute == null) { _fareRulesByFareAttribute = mapToValueList(getAllFareRules(), "fare", FareAttribute.class); } return list(_fareRulesByFareAttribute.get(fareAttribute)); }
@Override public List<Trip> getTripsForServiceId(AgencyAndId serviceId) { if (_tripsByServiceId == null) { _tripsByServiceId = mapToValueList(getAllTrips(), "serviceId", AgencyAndId.class); } return list(_tripsByServiceId.get(serviceId)); }
@Override public List<Trip> getTripsForRoute(Route route) { if (_tripsByRoute == null) _tripsByRoute = mapToValueList(getAllTrips(), "route", Route.class); return list(_tripsByRoute.get(route)); }