Class StopTimeModel

java.lang.Object
com.nnamo.models.StopTimeModel

public class StopTimeModel extends Object
Represents a GTFS stop time entry for a trip, including arrival and departure times at a stop. Example: Trip 123 arrives at stop 456 at 19:84
  • Constructor Details

    • StopTimeModel

      public StopTimeModel()
      Empty constructor required by OrmLite.
    • StopTimeModel

      public StopTimeModel(TripModel trip, StopModel stop, int arrival_time, int departure_time)
      Constructs a StopTimeModel with the specified trip, stop, arrival time, and departure time.
      Parameters:
      trip - the trip associated with this stop time
      stop - the stop associated with this stop time
      arrival_time - arrival time in seconds after midnight
      departure_time - departure time in seconds after midnight
  • Method Details

    • getId

      public int getId()
      Gets the unique identifier for this stop time entry.
      Returns:
      the ID
    • getStop

      public StopModel getStop()
      Gets the stop associated with this stop time.
      Returns:
      the StopModel
    • getTrip

      public TripModel getTrip()
      Gets the trip associated with this stop time.
      Returns:
      the TripModel
    • getArrivalTime

      public int getArrivalTime()
      Gets the arrival time in seconds after midnight.
      Returns:
      the arrival time
    • getArrivalTimeAsStr

      public String getArrivalTimeAsStr()
      Gets the arrival time as a formatted string.
      Returns:
      the arrival time string
    • getDepartureTime

      public int getDepartureTime()
      Gets the departure time in seconds after midnight.
      Returns:
      the departure time
    • getDepartureTimeAsStr

      public String getDepartureTimeAsStr()
      Gets the departure time as a formatted string.
      Returns:
      the departure time string
    • toString

      public String toString()
      Returns a string representation of the StopTimeModel.
      Overrides:
      toString in class Object
      Returns:
      string representation