Class TransitDetails

java.lang.Object
ai.nextbillion.maps.model.TransitDetails
All Implemented Interfaces:
java.io.Serializable

public class TransitDetails
extends java.lang.Object
implements java.io.Serializable
Transit directions return additional information that is not relevant for other modes of transportation. These additional properties are exposed through the TransitDetails object, returned as a field of an element in the steps array. From the TransitDetails object you can access additional information about the transit stop, transit line, and transit agency.
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    StopDetails arrivalStop
    Information about the arrival stop/station for this part of the trip.
    java.time.ZonedDateTime arrivalTime
    The arrival time for this leg of the journey.
    StopDetails departureStop
    Information about the departure stop/station for this part of the trip.
    java.time.ZonedDateTime departureTime
    The departure time for this leg of the journey.
    java.lang.String headsign
    The direction in which to travel on this line, as it is marked on the vehicle or at the departure stop.
    long headway
    The expected number of seconds between departures from the same stop at this time.
    TransitLine line
    Information about the transit line used in this step.
    int numStops
    The number of stops in this step, counting the arrival stop, but not the departure stop.
  • Constructor Summary

    Constructors 
    Constructor Description
    TransitDetails()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • arrivalStop

      public StopDetails arrivalStop
      Information about the arrival stop/station for this part of the trip.
    • departureStop

      public StopDetails departureStop
      Information about the departure stop/station for this part of the trip.
    • arrivalTime

      public java.time.ZonedDateTime arrivalTime
      The arrival time for this leg of the journey.
    • departureTime

      public java.time.ZonedDateTime departureTime
      The departure time for this leg of the journey.
    • headsign

      public java.lang.String headsign
      The direction in which to travel on this line, as it is marked on the vehicle or at the departure stop. This will often be the terminus station.
    • headway

      public long headway
      The expected number of seconds between departures from the same stop at this time. For example, with a headway value of 600, you would expect a ten minute wait if you should miss your bus.
    • numStops

      public int numStops
      The number of stops in this step, counting the arrival stop, but not the departure stop. For example, if your directions involve leaving from Stop A, passing through stops B and C, and arriving at stop D, numStops will equal 3.
    • line

      public TransitLine line
      Information about the transit line used in this step.
  • Constructor Details

  • Method Details

    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object