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

org.opentripplanner.routing.api.response.RoutingResponse Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.opentripplanner.routing.api.response;

import java.util.List;
import org.opentripplanner.model.plan.TripPlan;
import org.opentripplanner.model.plan.pagecursor.PageCursor;
import org.opentripplanner.routing.framework.DebugTimingAggregator;
import org.opentripplanner.util.lang.ToStringBuilder;

public class RoutingResponse {

  private final TripPlan tripPlan;
  private final PageCursor nextPageCursor;
  private final PageCursor previousPageCursor;
  private final TripSearchMetadata metadata;
  private final List routingErrors;
  private final DebugTimingAggregator debugTimingAggregator;

  public RoutingResponse(
    TripPlan tripPlan,
    PageCursor previousPageCursor,
    PageCursor nextPageCursor,
    TripSearchMetadata metadata,
    List routingErrors,
    DebugTimingAggregator debugTimingAggregator
  ) {
    this.tripPlan = tripPlan;
    this.nextPageCursor = nextPageCursor;
    this.previousPageCursor = previousPageCursor;
    this.metadata = metadata;
    this.routingErrors = routingErrors;
    this.debugTimingAggregator = debugTimingAggregator;
  }

  public TripPlan getTripPlan() {
    return tripPlan;
  }

  public PageCursor getNextPageCursor() {
    return nextPageCursor;
  }

  public PageCursor getPreviousPageCursor() {
    return previousPageCursor;
  }

  public TripSearchMetadata getMetadata() {
    return metadata;
  }

  public DebugTimingAggregator getDebugTimingAggregator() {
    return debugTimingAggregator;
  }

  public List getRoutingErrors() {
    return routingErrors;
  }

  @Override
  public String toString() {
    return ToStringBuilder
      .of(RoutingResponse.class)
      .addObj("tripPlan", tripPlan)
      .addObj("nextPageCursor", nextPageCursor)
      .addObj("previousPageCursor", previousPageCursor)
      .addObj("metadata", metadata)
      .addObj("routingErrors", routingErrors)
      .toString();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy