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

org.opentripplanner.transit.raptor.rangeraptor.debug.DebugHandlerPathAdapter Maven / Gradle / Ivy

package org.opentripplanner.transit.raptor.rangeraptor.debug;

import org.opentripplanner.transit.raptor.api.path.Path;
import org.opentripplanner.transit.raptor.api.request.DebugRequest;
import org.opentripplanner.transit.raptor.api.transit.RaptorTripSchedule;
import org.opentripplanner.transit.raptor.rangeraptor.WorkerLifeCycle;

import java.util.List;

/**
 * Path adapter.
 *
 * @param  The TripSchedule type defined by the user of the raptor API.
 */
final class DebugHandlerPathAdapter  extends AbstractDebugHandlerAdapter> {

    DebugHandlerPathAdapter(DebugRequest debug, WorkerLifeCycle lifeCycle) {
        super(debug, debug.pathFilteringListener(), lifeCycle);
    }

    @Override
    protected int stop(Path path) {
        return path.egressLeg().fromStop();
    }

    @Override
    protected List stopsVisited(Path path) {
        return path.listStops();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy