public class GtfsStopTime extends CsvBase implements java.lang.Comparable<GtfsStopTime>
Constructor and Description |
---|
GtfsStopTime(org.apache.commons.csv.CSVRecord record,
boolean supplemental,
java.lang.String fileName)
Creates a GtfsStopTime object by reading the data from the CSVRecord.
|
GtfsStopTime(GtfsStopTime originalStopTime,
GtfsStopTime supplementStopTime)
When combining a regular stop time with a supplemental one need to
create a whole new object since this class is Immutable to make it safer
to use.
|
GtfsStopTime(GtfsStopTime originalValues,
java.lang.Integer newArrivalTimeSecs)
For when need to create a GtfsStopTime that is a wait stop.
|
GtfsStopTime(java.lang.String tripId,
java.lang.String arrivalTimeStr,
java.lang.String departureTimeStr,
java.lang.String stopId,
int stopSequence,
java.lang.Boolean timepointStop)
For creating a GtfsStopTime object from scratch
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GtfsStopTime arg0)
So can use Collections.sort() to sort an Array of GtfsStopTime objects by
stop sequence.
|
java.lang.Integer |
getArrivalTimeSecs() |
java.lang.Integer |
getDepartureTimeSecs() |
java.lang.String |
getDropOffType() |
java.lang.String |
getPickupType() |
java.lang.Double |
getShapeDistTraveled() |
java.lang.String |
getStopHeadsign() |
java.lang.String |
getStopId() |
int |
getStopSequence() |
java.lang.String |
getTripId() |
boolean |
isTimepointStop()
Returns true if the stop_time is configured as a timepoint
stop that should be included with schedule adherence reports.
|
boolean |
isWaitStop() |
boolean |
shouldDelete() |
java.lang.String |
toString() |
getFileName, getLineNumber
public GtfsStopTime(java.lang.String tripId, java.lang.String arrivalTimeStr, java.lang.String departureTimeStr, java.lang.String stopId, int stopSequence, java.lang.Boolean timepointStop)
tripId
- arrivalTimeStr
- departureTimeStr
- stopId
- stopSequence
- Index of stop in triptimepointStop
- shapeDistTraveled
- public GtfsStopTime(org.apache.commons.csv.CSVRecord record, boolean supplemental, java.lang.String fileName) throws java.lang.NumberFormatException
record
- supplemental
- fileName
- for logging errorsjava.lang.NumberFormatException
public GtfsStopTime(GtfsStopTime originalValues, java.lang.Integer newArrivalTimeSecs)
originalValues
- The original values from the stop_times.txt filenewArrivalTimeSecs
- The new arrival time.public GtfsStopTime(GtfsStopTime originalStopTime, GtfsStopTime supplementStopTime)
originalStopTime
- supplementStopTime
- public java.lang.String getTripId()
public java.lang.Integer getArrivalTimeSecs()
public java.lang.Integer getDepartureTimeSecs()
public java.lang.String getStopId()
public int getStopSequence()
public java.lang.String getStopHeadsign()
public java.lang.String getPickupType()
public java.lang.String getDropOffType()
public boolean isTimepointStop()
public java.lang.Double getShapeDistTraveled()
public boolean shouldDelete()
public boolean isWaitStop()
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(GtfsStopTime arg0)
compareTo
in interface java.lang.Comparable<GtfsStopTime>
arg0
-