org.opentripplanner.transit.raptor.rangeraptor.standard.stoparrivals.view.Access 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.standard.stoparrivals.view;
import org.opentripplanner.transit.raptor.api.transit.RaptorTransfer;
import org.opentripplanner.transit.raptor.api.transit.RaptorTripSchedule;
import org.opentripplanner.transit.raptor.api.view.AccessPathView;
import org.opentripplanner.transit.raptor.api.view.ArrivalView;
final class Access
extends StopArrivalViewAdapter
implements AccessPathView
{
private final int arrivalTime;
private final RaptorTransfer access;
Access(int round, int arrivalTime, RaptorTransfer access) {
super(round, access.stop());
this.arrivalTime = arrivalTime;
this.access = access;
}
@Override
public int arrivalTime() {
return arrivalTime;
}
@Override
public boolean arrivedByAccess() {
return true;
}
@Override
public AccessPathView accessPath() {
return this;
}
@Override
public RaptorTransfer access() {
return access;
}
@Override
public ArrivalView previous() {
throw new UnsupportedOperationException("Access path arrival is the first path.");
}
}