org.opentripplanner.transit.model.basic.TransitMode 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.model.basic;
import java.util.EnumSet;
import java.util.Set;
/**
* Equivalent to GTFS route_type or to NeTEx TransportMode.
*/
public enum TransitMode {
RAIL,
COACH,
SUBWAY,
BUS,
TRAM,
FERRY,
AIRPLANE,
CABLE_CAR,
GONDOLA,
FUNICULAR,
TROLLEYBUS,
MONORAIL;
private static final Set ON_STREET_MODES = EnumSet.of(COACH, BUS, TROLLEYBUS);
private static final Set NO_AIRPLANE_MODES = EnumSet.complementOf(
EnumSet.of(AIRPLANE)
);
public static Set transitModesExceptAirplane() {
return NO_AIRPLANE_MODES;
}
public boolean onStreet() {
return ON_STREET_MODES.contains(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy