Package com.cta4j.bus.vehicle.model
Record Class VehicleMetadata
java.lang.Object
java.lang.Record
com.cta4j.bus.vehicle.model.VehicleMetadata
- Record Components:
dataFeed- the data feed from which this vehicle information was obtained, if applicablelastUpdated- the date and time (UTC) this vehicle information was last updated, if applicablepatternId- the pattern identifier for the trip this vehicle is servicingdistanceToPatternPoint- the number of feet this vehicle has traveled into the pattern currently being servicedstopStatus- the stop status of this vehicle, if applicabletimepointId- the timepoint identifier associated with this vehicle, if applicablestopId- the stop identifier associated with this vehicle, if applicablesequence- the sequence number associated with this vehicle, if applicablegtfsSequence- the GTFS sequence number associated with this vehicle, if applicableserverTimestamp- the date and time (UTC) this vehicle information was received by the server, if applicablespeed- the current speed of this vehicle in miles per hour, if applicableblock- the block number for this vehicle, if applicableblockId- the scheduled block identifier for this vehicletripId- the scheduled trip identifier for this vehicleoriginalTripNumber- the trip identifier for this vehiclezone- the zone name for this vehicle, otherwise blankmode- theTransitModeof this vehiclepassengerLoad- thePassengerLoadof this vehiclescheduledStartSeconds- the scheduled start time in seconds past midnight associated with this vehicle, if applicablescheduledStartDate- the scheduled start date associated with this vehicle, if applicable
@NullMarked
public record VehicleMetadata(@Nullable String dataFeed, @Nullable Instant lastUpdated, String patternId, int distanceToPatternPoint, @Nullable Integer stopStatus, @Nullable Integer timepointId, @Nullable String stopId, @Nullable Integer sequence, @Nullable Integer gtfsSequence, @Nullable Instant serverTimestamp, @Nullable Integer speed, @Nullable Integer block, String blockId, String tripId, String originalTripNumber, String zone, TransitMode mode, PassengerLoad passengerLoad, @Nullable Integer scheduledStartSeconds, @Nullable LocalDate scheduledStartDate)
extends Record
Represents metadata associated with a vehicle.
NOTE: dataFeed, stopStatus, timepointId, stopId, sequence,
gtfsSequence, serverTimestamp, speed, and block are not well-documented by the
CTA. As such, their presence here is primarily for completeness and may not be populated or described correctly.
-
Constructor Summary
ConstructorsConstructorDescriptionVehicleMetadata(@Nullable String dataFeed, @Nullable Instant lastUpdated, String patternId, int distanceToPatternPoint, @Nullable Integer stopStatus, @Nullable Integer timepointId, @Nullable String stopId, @Nullable Integer sequence, @Nullable Integer gtfsSequence, @Nullable Instant serverTimestamp, @Nullable Integer speed, @Nullable Integer block, String blockId, String tripId, String originalTripNumber, String zone, TransitMode mode, PassengerLoad passengerLoad, @Nullable Integer scheduledStartSeconds, @Nullable LocalDate scheduledStartDate) Constructs aVehicleMetadata. -
Method Summary
Modifier and TypeMethodDescription@Nullable Integerblock()Returns the value of theblockrecord component.blockId()Returns the value of theblockIdrecord component.@Nullable StringdataFeed()Returns the value of thedataFeedrecord component.intReturns the value of thedistanceToPatternPointrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable IntegerReturns the value of thegtfsSequencerecord component.final inthashCode()Returns a hash code value for this object.@Nullable InstantReturns the value of thelastUpdatedrecord component.mode()Returns the value of themoderecord component.Returns the value of theoriginalTripNumberrecord component.Returns the value of thepassengerLoadrecord component.Returns the value of thepatternIdrecord component.@Nullable LocalDateReturns the value of thescheduledStartDaterecord component.@Nullable IntegerReturns the value of thescheduledStartSecondsrecord component.@Nullable Integersequence()Returns the value of thesequencerecord component.@Nullable InstantReturns the value of theserverTimestamprecord component.@Nullable Integerspeed()Returns the value of thespeedrecord component.@Nullable StringstopId()Returns the value of thestopIdrecord component.@Nullable IntegerReturns the value of thestopStatusrecord component.@Nullable IntegerReturns the value of thetimepointIdrecord component.final StringtoString()Returns a string representation of this record class.tripId()Returns the value of thetripIdrecord component.zone()Returns the value of thezonerecord component.
-
Constructor Details
-
VehicleMetadata
public VehicleMetadata(@Nullable String dataFeed, @Nullable Instant lastUpdated, String patternId, int distanceToPatternPoint, @Nullable Integer stopStatus, @Nullable Integer timepointId, @Nullable String stopId, @Nullable Integer sequence, @Nullable Integer gtfsSequence, @Nullable Instant serverTimestamp, @Nullable Integer speed, @Nullable Integer block, String blockId, String tripId, String originalTripNumber, String zone, TransitMode mode, PassengerLoad passengerLoad, @Nullable Integer scheduledStartSeconds, @Nullable LocalDate scheduledStartDate) Constructs aVehicleMetadata.- Parameters:
dataFeed- the data feed from which the vehicle information was obtained, if applicablelastUpdated- the date and time (UTC) the vehicle information was last updated, if applicablepatternId- the pattern identifier for the trip the vehicle is servicingdistanceToPatternPoint- the number of feet the vehicle has traveled into the pattern currently being servicedstopStatus- the stop status of the vehicle, if applicabletimepointId- the timepoint identifier associated with the vehicle, if applicablestopId- the stop identifier associated with the vehicle, if applicablesequence- the sequence number associated with the vehicle, if applicablegtfsSequence- the GTFS sequence number associated with the vehicle, if applicableserverTimestamp- the date and time (UTC) the vehicle information was received by the server, if applicablespeed- the current speed of the vehicle in miles per hour, if applicableblock- the block number for the vehicle, if applicableblockId- the scheduled block identifier for the vehicletripId- the scheduled trip identifier for the vehicleoriginalTripNumber- the trip identifier for the vehiclezone- the zone name for the vehicle, otherwise blankmode- theTransitModeof the vehiclepassengerLoad- thePassengerLoadof the vehiclescheduledStartSeconds- the scheduled start time in seconds past midnight associated with the vehicle, if applicablescheduledStartDate- the scheduled start date associated with the vehicle, if applicable- Throws:
NullPointerException- ifpatternId,blockId,tripId,originalTripNumber,zone,mode, orpassengerLoadisnull
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
dataFeed
Returns the value of thedataFeedrecord component.- Returns:
- the value of the
dataFeedrecord component
-
lastUpdated
Returns the value of thelastUpdatedrecord component.- Returns:
- the value of the
lastUpdatedrecord component
-
patternId
Returns the value of thepatternIdrecord component.- Returns:
- the value of the
patternIdrecord component
-
distanceToPatternPoint
public int distanceToPatternPoint()Returns the value of thedistanceToPatternPointrecord component.- Returns:
- the value of the
distanceToPatternPointrecord component
-
stopStatus
Returns the value of thestopStatusrecord component.- Returns:
- the value of the
stopStatusrecord component
-
timepointId
Returns the value of thetimepointIdrecord component.- Returns:
- the value of the
timepointIdrecord component
-
stopId
Returns the value of thestopIdrecord component.- Returns:
- the value of the
stopIdrecord component
-
sequence
Returns the value of thesequencerecord component.- Returns:
- the value of the
sequencerecord component
-
gtfsSequence
Returns the value of thegtfsSequencerecord component.- Returns:
- the value of the
gtfsSequencerecord component
-
serverTimestamp
Returns the value of theserverTimestamprecord component.- Returns:
- the value of the
serverTimestamprecord component
-
speed
Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
blockId
Returns the value of theblockIdrecord component.- Returns:
- the value of the
blockIdrecord component
-
tripId
Returns the value of thetripIdrecord component.- Returns:
- the value of the
tripIdrecord component
-
originalTripNumber
Returns the value of theoriginalTripNumberrecord component.- Returns:
- the value of the
originalTripNumberrecord component
-
zone
Returns the value of thezonerecord component.- Returns:
- the value of the
zonerecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
passengerLoad
Returns the value of thepassengerLoadrecord component.- Returns:
- the value of the
passengerLoadrecord component
-
scheduledStartSeconds
Returns the value of thescheduledStartSecondsrecord component.- Returns:
- the value of the
scheduledStartSecondsrecord component
-
scheduledStartDate
Returns the value of thescheduledStartDaterecord component.- Returns:
- the value of the
scheduledStartDaterecord component
-