
org.opentripplanner.updater.GtfsRealtimeMapper 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.updater;
import com.google.transit.realtime.GtfsRealtime;
import java.util.Optional;
import org.opentripplanner.transit.model.basic.Accessibility;
public class GtfsRealtimeMapper {
public static Optional mapWheelchairAccessible(
GtfsRealtime.VehicleDescriptor.WheelchairAccessible wheelchairAccessible
) {
return Optional.ofNullable(
switch (wheelchairAccessible) {
case WHEELCHAIR_ACCESSIBLE -> Accessibility.POSSIBLE;
case WHEELCHAIR_INACCESSIBLE -> Accessibility.NOT_POSSIBLE;
case UNKNOWN -> Accessibility.NO_INFORMATION;
default -> null;
}
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy