Class Trip

    • Constructor Detail

      • Trip

        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)
        Construct Trip object from complete set of data.
        Parameters:
        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.
      • Trip

        public 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.
        Parameters:
        stop - Stop model
        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
      • Trip

        public Trip​(List raw)
             throws IOException
        Construct Trip object from raw list of attributes parsed from JSON.
        Parameters:
        raw - List of attributes from JSON line
        Throws:
        IOException - Thrown on invalid line format.
      • Trip

        public Trip​(List raw,
                    String version)
             throws IOException
        Construct Trip object from raw list of attributes parsed from JSON with explicitly specified version.
        Parameters:
        raw - List of attributes from JSON line
        version - API version
        Throws:
        IOException - Thrown on invalid line format.
    • Method Detail

      • getStop

        public Stop getStop()
        Returns:
        The (starting) stop.
      • getId

        public String getId()
        Returns:
        The trip ID.
      • getVisitID

        public Integer getVisitID()
        Returns:
        The visit ID.
      • getLineID

        public String getLineID()
        Returns:
        The line ID.
      • getLineName

        public String getLineName()
        Returns:
        The line name.
      • getDirectionID

        public Integer getDirectionID()
        Returns:
        The direction ID.
      • getDestinationName

        public String getDestinationName()
        Returns:
        The destination name.
      • getDestinationText

        public String getDestinationText()
        Returns:
        The destination text.
      • getEstimatedTime

        public Long getEstimatedTime()
        Returns:
        The estimated departure time.
      • getVehicleID

        public String getVehicleID()
        Returns:
        The vehicle ID or null if not present.