All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.model.plan.TransitLeg Maven / Gradle / Ivy

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