
org.opentripplanner.model.plan.TransitLeg 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.model.plan;
import javax.annotation.Nonnull;
import org.opentripplanner.transit.model.basic.TransitMode;
public interface TransitLeg extends Leg {
/**
* The mode (e.g., BUS
) used when traversing this leg.
*/
@Nonnull
TransitMode getMode();
@Override
default boolean isTransitLeg() {
return true;
}
@Override
default boolean hasSameMode(Leg other) {
return other instanceof TransitLeg trLeg && getMode().equals(trLeg.getMode());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy