Package com.cta4j.bus.stop.model
Record Class Stop
java.lang.Object
java.lang.Record
com.cta4j.bus.stop.model.Stop
- Record Components:
id- the unique identifier of this stopname- the display name of this stop (e.g. "Madison and Clark")latitude- the latitude coordinate of this stoplongitude- the longitude coordinate of this stopdetoursAdded- theListof detour IDs which temporarily add service to this stopdetoursRemoved- theListof detour IDs which temporarily remove service from this stopgtfsSequence- the GTFS sequence number of this stop, if applicableadaAccessible- whether this stop is ADA accessible, if known
@NullMarked
public record Stop(String id, String name, BigDecimal latitude, BigDecimal longitude, @Nullable List<Integer> detoursAdded, @Nullable List<Integer> detoursRemoved, @Nullable Integer gtfsSequence, @Nullable Boolean adaAccessible)
extends Record
Represents a bus stop.
NOTE: gtfsSequence is not well-documented by the CTA. As such, its presence here is primarily for
completeness and may not be populated or described correctly.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of theadaAccessiblerecord component.Returns the value of thedetoursAddedrecord component.Returns the value of thedetoursRemovedrecord 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.id()Returns the value of theidrecord component.latitude()Returns the value of thelatituderecord component.Returns the value of thelongituderecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Stop
public Stop(String id, String name, BigDecimal latitude, BigDecimal longitude, @Nullable List<Integer> detoursAdded, @Nullable List<Integer> detoursRemoved, @Nullable Integer gtfsSequence, @Nullable Boolean adaAccessible) Constructs aStop.- Parameters:
id- the unique identifier of the stopname- the display name of the stop (e.g. "Madison and Clark")latitude- the latitude coordinate of the stoplongitude- the longitude coordinate of the stopdetoursAdded- theListof detour IDs which temporarily add service to the stopdetoursRemoved- theListof detour IDs which temporarily remove service from the stopgtfsSequence- the GTFS sequence number of the stop, if applicableadaAccessible- whether the stop is ADA accessible, if known- Throws:
NullPointerException- ifid,name,latitude, orlongitudeisnull, or if any element ofdetoursAddedordetoursRemovedisnull
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
latitude
Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
detoursAdded
Returns the value of thedetoursAddedrecord component.- Returns:
- the value of the
detoursAddedrecord component
-
detoursRemoved
Returns the value of thedetoursRemovedrecord component.- Returns:
- the value of the
detoursRemovedrecord component
-
gtfsSequence
Returns the value of thegtfsSequencerecord component.- Returns:
- the value of the
gtfsSequencerecord component
-
adaAccessible
Returns the value of theadaAccessiblerecord component.- Returns:
- the value of the
adaAccessiblerecord component
-