use of org.opentripplanner.transit.raptor.api.transit.RaptorTransfer in project OpenTripPlanner by opentripplanner.
the class ForwardPathMapper method createAccessPathLeg.
private AccessPathLeg<T> createAccessPathLeg(ArrivalView<T> from, PathLeg<T> nextLeg) {
RaptorTransfer access = from.accessLeg().access();
int departureTime = from.arrivalTime() - access.durationInSeconds();
return new AccessPathLeg<>(access, from.stop(), departureTime, from.arrivalTime(), nextLeg);
}
use of org.opentripplanner.transit.raptor.api.transit.RaptorTransfer in project OpenTripPlanner by opentripplanner.
the class Stops method setupEgressStopStates.
/**
* Setup egress arrivals with a callback witch is notified when a new transit egress arrival happens.
*/
public void setupEgressStopStates(Iterable<RaptorTransfer> egressLegs, Consumer<EgressStopArrivalState<T>> transitArrivalCallback) {
for (int round = 1; round < stops.length; round++) {
for (RaptorTransfer leg : egressLegs) {
EgressStopArrivalState<T> state = new EgressStopArrivalState<>(round, leg, transitArrivalCallback);
stops[round][leg.stop()] = state;
}
}
}
Aggregations