
org.opentripplanner.gtfs.mapping.PickDropMapper 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
The newest version!
package org.opentripplanner.gtfs.mapping;
import static org.opentripplanner.model.StopTime.MISSING_VALUE;
import org.opentripplanner.model.PickDrop;
public class PickDropMapper {
public static PickDrop map(int gtfsCode) {
return switch (gtfsCode) {
case 0 -> PickDrop.SCHEDULED;
case 1 -> PickDrop.NONE;
case 2 -> PickDrop.CALL_AGENCY;
case 3 -> PickDrop.COORDINATE_WITH_DRIVER;
default -> throw new IllegalArgumentException("Not a valid gtfs code: " + gtfsCode);
};
}
public static PickDrop mapFlexContinuousPickDrop(int gtfsCode) {
if (gtfsCode == MISSING_VALUE) {
return PickDrop.NONE;
}
return map(gtfsCode);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy