public final class Trip extends Object
| Constructor and Description |
|---|
Trip(List raw)
Construct Trip object from raw list of attributes parsed from JSON.
|
Trip(List raw,
String version)
Construct Stop object from raw list of attributes parsed from JSON with explicitly specified version.
|
Trip(Stop stop,
Integer visitID,
String lineID,
String lineName,
Integer directionID,
String destinationName,
String destinationText,
String vehicleID,
String tripID,
Long estimatedTime)
Construct Trip object from Stop model and set of additional data.
|
Trip(String stopID,
String stopName,
String stopIndicator,
Integer stopState,
Double stopLatitude,
Double stopLongitude,
Integer visitID,
String lineID,
String lineName,
Integer directionID,
String destinationName,
String destinationText,
String vehicleID,
String tripID,
Long estimatedTime)
Construct Trip object from complete set of data.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDestinationName() |
String |
getDestinationText() |
Integer |
getDirectionID() |
Long |
getEstimatedTime() |
String |
getId() |
String |
getLineID() |
String |
getLineName() |
Stop |
getStop() |
String |
getVehicleID() |
Integer |
getVisitID() |
static IOException |
typeError(int field,
Class actual,
String expected)
Generate exception for unmatched type.
|
static IOException |
typeErrorString(int field,
Class actual)
Generate exception for unmatched type when String is expected.
|
public Trip(String stopID, String stopName, String stopIndicator, Integer stopState, Double stopLatitude, Double stopLongitude, Integer visitID, String lineID, String lineName, Integer directionID, String destinationName, String destinationText, String vehicleID, String tripID, Long estimatedTime)
stopID - Stop ID.stopName - Stop name.stopIndicator - Stop Indicator.stopState - Stop state.stopLatitude - Stop geolocation latitude.stopLongitude - Stop geolocation latitude.visitID - Visit ID.lineID - Line ID.lineName - Line name.directionID - Direction ID.destinationName - Destination name.destinationText - Destination text.vehicleID - Vehicle ID.tripID - Trip ID.estimatedTime - Estimated time.public Trip(Stop stop, Integer visitID, String lineID, String lineName, Integer directionID, String destinationName, String destinationText, String vehicleID, String tripID, Long estimatedTime)
stop - Stop modelvisitID - Visit IDlineID - Line IDlineName - Line namedirectionID - Direction IDdestinationName - Destination namedestinationText - Destination textvehicleID - Vehicle IDtripID - Trip IDestimatedTime - Estimated timepublic Trip(List raw) throws IOException
raw - List of attributes from JSON lineIOException - Thrown on invalid line format.public Trip(List raw, String version) throws IOException
raw - List of attributes from JSON lineversion - API versionIOException - Thrown on invalid line format.public Stop getStop()
public String getId()
public Integer getVisitID()
public String getLineID()
public String getLineName()
public Integer getDirectionID()
public String getDestinationName()
public String getDestinationText()
public Long getEstimatedTime()
public String getVehicleID()
public static IOException typeErrorString(int field, Class actual)
field - Field number.actual - Actual class.public static IOException typeError(int field, Class actual, String expected)
field - Field number.actual - Actual class.expected - Expected type.Copyright © 2016–2018. All rights reserved.