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

org.opentripplanner.model.transfer.RouteStopTransferPoint Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.model.transfer;

import java.io.Serializable;
import org.opentripplanner.transit.model.network.Route;
import org.opentripplanner.transit.model.site.StopLocation;
import org.opentripplanner.util.lang.ValueObjectToStringBuilder;

public final class RouteStopTransferPoint implements TransferPoint, Serializable {

  private static final long serialVersionUID = 1L;

  private final Route route;
  private final StopLocation stop;

  public RouteStopTransferPoint(Route route, StopLocation stop) {
    this.route = route;
    this.stop = stop;
  }

  public Route getRoute() {
    return route;
  }

  public StopLocation getStop() {
    return stop;
  }

  @Override
  public boolean appliesToAllTrips() {
    return true;
  }

  @Override
  public int getSpecificityRanking() {
    return 3;
  }

  @Override
  public boolean isRouteStopTransferPoint() {
    return true;
  }

  @Override
  public String toString() {
    return ValueObjectToStringBuilder
      .of()
      .addText("RouteTP{")
      .addObj(route.getId())
      .addText(", stop ")
      .addObj(stop.getId())
      .addText("}")
      .toString();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy