
org.opentripplanner.raptor.spi.RaptorTimeTable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
The newest version!
package org.opentripplanner.raptor.spi;
import org.opentripplanner.raptor.api.model.RaptorTripSchedule;
import org.opentripplanner.raptor.api.model.SearchDirection;
/**
* A TimeTable is a list of trips in service for the given search date and a limited time before and
* after. This can be a subset of all trips available to speed up the trip search - that is left to
* the implementation of this interface. Raptor uses a binary search to find the right
* trip-schedule, so even for long time-tables the Raptor search perform quite well.
*
* @param The TripSchedule type defined by the user of the raptor API.
*/
public interface RaptorTimeTable {
/**
* Get trip schedule by index. Trip schedules should be listed in order by the departure time for
* the first stop in the pattern.
*
* This method needs to be FAST - it is in the most critical line of execution in Raptor.
*
* @param index the trip schedule index in pattern starting at 0.
*/
T getTripSchedule(int index);
/**
* Number of trips in time-table.
*/
int numberOfTripSchedules();
/**
* Factory method to create the trip search
*/
RaptorTripScheduleSearch tripSearch(SearchDirection direction);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy