org.opentripplanner.transit.raptor.rangeraptor.multicriteria.arrivals.TransitStopArrival Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.transit.raptor.rangeraptor.multicriteria.arrivals;
import org.opentripplanner.transit.raptor.api.transit.RaptorTripSchedule;
import org.opentripplanner.transit.raptor.api.view.TransitLegView;
/**
*
* @param The TripSchedule type defined by the user of the raptor API.
*/
public final class TransitStopArrival
extends AbstractStopArrival
implements TransitLegView
{
private final T trip;
public TransitStopArrival(
AbstractStopArrival previousState,
int stopIndex,
int arrivalTime,
int additionalCost,
T trip
) {
super(
previousState,
stopIndex,
arrivalTime,
additionalCost
);
this.trip = trip;
}
@Override
public boolean arrivedByTransit() {
return true;
}
@Override
public TransitLegView transitLeg() {
return this;
}
public T trip() {
return trip;
}
public int boardStop() {
return previousStop();
}
}