Package com.nnamo.models
Class StopTimeModel
java.lang.Object
com.nnamo.models.StopTimeModel
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 Summary
ConstructorsConstructorDescriptionEmpty constructor required by OrmLite.StopTimeModel
(TripModel trip, StopModel stop, int arrival_time, int departure_time) Constructs a StopTimeModel with the specified trip, stop, arrival time, and departure time. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the arrival time in seconds after midnight.Gets the arrival time as a formatted string.int
Gets the departure time in seconds after midnight.Gets the departure time as a formatted string.int
getId()
Gets the unique identifier for this stop time entry.getStop()
Gets the stop associated with this stop time.getTrip()
Gets the trip associated with this stop time.toString()
Returns a string representation of the StopTimeModel.
-
Constructor Details
-
StopTimeModel
public StopTimeModel()Empty constructor required by OrmLite. -
StopTimeModel
Constructs a StopTimeModel with the specified trip, stop, arrival time, and departure time.- Parameters:
trip
- the trip associated with this stop timestop
- the stop associated with this stop timearrival_time
- arrival time in seconds after midnightdeparture_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
Gets the stop associated with this stop time.- Returns:
- the StopModel
-
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
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
Gets the departure time as a formatted string.- Returns:
- the departure time string
-
toString
Returns a string representation of the StopTimeModel.
-