Package com.nnamo.models
Class RealtimeStopUpdate
java.lang.Object
com.nnamo.models.RealtimeStopUpdate
Represents a real-time update for a stop on a transit trip.
Contains trip, route, stop, time update, and vehicle position information.
It's not an ORMLite model, but a model used to have everything related to a
trip stop update in the same class
-
Constructor Summary
ConstructorsConstructorDescriptionRealtimeStopUpdate
(String tripId, String routeId, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate timeUpdate, com.google.transit.realtime.GtfsRealtime.VehiclePosition vehiclePosition) Constructs a RealtimeStopUpdate with the specified trip, route, time update, and vehicle position. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the arrival time in seconds of day.int
Gets the departure time in seconds of day.Gets the route identifier.Gets the stop identifier.com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate
Gets the stop time update.Gets the trip identifier.long
Gets the delay for the update.com.google.transit.realtime.GtfsRealtime.VehiclePosition
Gets the vehicle position.
-
Constructor Details
-
RealtimeStopUpdate
public RealtimeStopUpdate(String tripId, String routeId, com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate timeUpdate, com.google.transit.realtime.GtfsRealtime.VehiclePosition vehiclePosition) Constructs a RealtimeStopUpdate with the specified trip, route, time update, and vehicle position.- Parameters:
tripId
- the trip identifierrouteId
- the route identifiertimeUpdate
- the stop time updatevehiclePosition
- the vehicle position
-
-
Method Details
-
getTripId
Gets the trip identifier.- Returns:
- the trip ID
-
getStopId
Gets the stop identifier.- Returns:
- the stop ID
-
getRouteId
Gets the route identifier.- Returns:
- the route ID
-
getTimeUpdate
public com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate getTimeUpdate()Gets the stop time update.- Returns:
- the stop time update
-
getVehiclePosition
public com.google.transit.realtime.GtfsRealtime.VehiclePosition getVehiclePosition()Gets the vehicle position.- Returns:
- the vehicle position
-
getArrivalTime
public int getArrivalTime()Gets the arrival time in seconds of day.- Returns:
- the arrival time in seconds of day
-
getDepartureTime
public int getDepartureTime()Gets the departure time in seconds of day.- Returns:
- the departure time in seconds of day
-
getUpdateDelay
public long getUpdateDelay()Gets the delay for the update.- Returns:
- the delay in seconds
-