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

org.opentripplanner.model.StopTimeKey Maven / Gradle / Ivy

package org.opentripplanner.model;

/**
 * This class is used as a reference to a StopTime wrapping the {@link Trip#getId()} and {@code stopSequence}.
 * StopTimes instances do not exist in the graph as entities, they are represented by
 * the {@link org.opentripplanner.routing.trippattern.TripTimes}, but we use this class to map other entities
 * (NoticeAssignment) to StopTimes to be able to decorate itineraries with such data.
 */
public class StopTimeKey extends TransitEntity {

    public StopTimeKey(FeedScopedId tripId, int stopSequenceNumber) {
        super(new FeedScopedId(tripId.getFeedId(), tripId.getId() + "_#" + stopSequenceNumber));
    }

    @Override
    public String toString() {
        return "StopTimeKey<" + getId() + ">";
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy