public class IpcPrediction
extends java.lang.Object
implements java.io.Serializable
Declared serializable since using RMI to pass back Prediction objects and RMI uses serialization.
Modifier and Type | Class and Description |
---|---|
static class |
IpcPrediction.ArrivalOrDeparture |
Constructor and Description |
---|
IpcPrediction(AvlReport avlReport,
java.lang.String stopId,
int gtfsStopSeq,
Trip trip,
long predictionTime,
long actualPredictionTime,
boolean atEndOfTrip,
boolean predictionAffectedByWaitStop,
boolean isDelayed,
boolean lateAndSubsequentTripSoMarkAsUncertain,
IpcPrediction.ArrivalOrDeparture arrivalOrDeparture)
Constructs a Prediction object.
|
Modifier and Type | Method and Description |
---|---|
long |
getActualPredictionTime() |
long |
getAvlTime() |
java.lang.String |
getBlockId() |
long |
getCreationTime() |
java.lang.String |
getDriverId()
Returns the driver ID if it is available.
|
int |
getGtfsStopSeq() |
short |
getPassengerCount()
Returns the passenger count as obtained from the AVL feed.
|
long |
getPredictionTime() |
java.lang.String |
getRouteId() |
java.lang.String |
getRouteShortName()
Returns the short name for the route associated with the prediction.
|
java.lang.String |
getStopId() |
Trip |
getTrip()
Returns the trip associated with the prediction.
|
java.lang.String |
getTripId() |
java.lang.String |
getTripPatternId() |
long |
getTripStartEpochTime() |
java.lang.String |
getVehicleId() |
boolean |
isAffectedByWaitStop() |
boolean |
isArrival() |
boolean |
isAtEndOfTrip() |
boolean |
isDelayed() |
boolean |
isLateAndSubsequentTripSoMarkAsUncertain()
For when vehicle is quite late and prediction is for a subsequent trip.
|
boolean |
isPassengerCountValid()
Passenger counts only valid for systems where there actually are
passenger counting sensors.
|
boolean |
isSchedBasedPred() |
java.lang.String |
toString() |
public IpcPrediction(AvlReport avlReport, java.lang.String stopId, int gtfsStopSeq, Trip trip, long predictionTime, long actualPredictionTime, boolean atEndOfTrip, boolean predictionAffectedByWaitStop, boolean isDelayed, boolean lateAndSubsequentTripSoMarkAsUncertain, IpcPrediction.ArrivalOrDeparture arrivalOrDeparture)
avlReport
- stopId
- gtfsStopSeq
- trip
- Can be set to null for testing but usually will be a valid
trippredictionTime
- The prediction to present to the user. Can be different from
actualPredictionTime in that for wait stops might want to show
user the scheduled time even if the actual prediction time,
including the stop wait time, might be greater.actualPredictionTime
- The prediction time including all factors, including the stop
wait time for wait stops presented to the user is different
than the actual prediction time. Only used on server side when
calculating predictions.atEndOfTrip
- True if prediction for last stop of trip, which means likely
not useful to userpredictionAffectedByWaitStop
- isDelayed
- lateAndSubsequentTripSoMarkAsUncertain
- arrivalOrDeparture
- public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getVehicleId()
public java.lang.String getRouteId()
public java.lang.String getStopId()
public int getGtfsStopSeq()
public java.lang.String getTripId()
public java.lang.String getTripPatternId()
public java.lang.String getBlockId()
public long getPredictionTime()
public long getActualPredictionTime()
public boolean isAtEndOfTrip()
public boolean isSchedBasedPred()
public boolean isAffectedByWaitStop()
public long getAvlTime()
public long getCreationTime()
public long getTripStartEpochTime()
public java.lang.String getDriverId()
public short getPassengerCount()
public boolean isPassengerCountValid()
public boolean isDelayed()
public boolean isLateAndSubsequentTripSoMarkAsUncertain()
public boolean isArrival()
public Trip getTrip()
public java.lang.String getRouteShortName()