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.5.0
Show newest version
package org.opentripplanner.routing.api.response;

import org.opentripplanner.model.plan.TripPlan;
import org.opentripplanner.routing.framework.DebugAggregator;

import java.util.List;
import java.util.StringJoiner;

public class RoutingResponse {
    private final TripPlan tripPlan;
    private final TripSearchMetadata metadata;
    private final List routingErrors;
    private final DebugAggregator debugAggregator;

    public RoutingResponse(
        TripPlan tripPlan,
        TripSearchMetadata metadata,
        List routingErrors,
        DebugAggregator debugAggregator
    ) {
        this.tripPlan = tripPlan;
        this.metadata = metadata;
        this.routingErrors = routingErrors;
        this.debugAggregator = debugAggregator;
    }

    public TripPlan getTripPlan() {
        return tripPlan;
    }

    public TripSearchMetadata getMetadata() {
        return metadata;
    }

    public DebugAggregator getDebugAggregator() {
        return debugAggregator;
    }

    public List getRoutingErrors() { return routingErrors; }

    @Override
    public String toString() {
        return new StringJoiner(
                ", ", RoutingResponse.class.getSimpleName() + "[", "]"
        )
                .add("tripPlan=" + tripPlan)
                .add("metadata=" + metadata)
                .toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy