for (State s : path.states) {
if (s.getBackEdge() instanceof TransitBoardAlight) {
TransitBoardAlight tbae = (TransitBoardAlight) s.getBackEdge();
int boardingStopIndex = tbae.getStopIndex();
AgencyAndId tripId = s.getTripId();
BannedStopSet stopSet;
if (partial) {
stopSet = new BannedStopSet();
stopSet.add(boardingStopIndex);
} else {
stopSet = BannedStopSet.ALL;
}
if (tripId != null)
usedTripDefs.add(new T2<AgencyAndId, BannedStopSet>(tripId, stopSet));
}
}
// Used trips should not contains a banned trip
for (T2<AgencyAndId, BannedStopSet> usedTripDef : usedTripDefs) {
BannedStopSet bannedStopSet = options.bannedTrips.get(usedTripDef.first);
if (bannedStopSet != null) {
for (Integer stopIndex : usedTripDef.second) {
assertFalse(bannedStopSet.contains(stopIndex));
}
}
}
if (usedTripDefs.size() == 0)
break; // Not a transit trip, no sense to ban trip any longer