Class RouteLeg

    • Method Detail

      • ferryLegDetails

        public final RouteFerryLegDetails ferryLegDetails()

        FerryLegDetails is populated when the Leg type is Ferry, and provides additional information that is specific

        Returns:
        FerryLegDetails is populated when the Leg type is Ferry, and provides additional information that is specific
      • geometry

        public final RouteLegGeometry geometry()

        Geometry of the area to be avoided.

        Returns:
        Geometry of the area to be avoided.
      • language

        public final String language()

        List of languages for instructions within steps in the response.

        Returns:
        List of languages for instructions within steps in the response.
      • pedestrianLegDetails

        public final RoutePedestrianLegDetails pedestrianLegDetails()

        Details related to the pedestrian leg.

        Returns:
        Details related to the pedestrian leg.
      • travelMode

        public final RouteLegTravelMode travelMode()

        Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

        Default Value: Car

        If the service returns an enum value that is not available in the current SDK version, travelMode will return RouteLegTravelMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from travelModeAsString().

        Returns:
        Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

        Default Value: Car

        See Also:
        RouteLegTravelMode
      • travelModeAsString

        public final String travelModeAsString()

        Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

        Default Value: Car

        If the service returns an enum value that is not available in the current SDK version, travelMode will return RouteLegTravelMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from travelModeAsString().

        Returns:
        Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

        Default Value: Car

        See Also:
        RouteLegTravelMode
      • vehicleLegDetails

        public final RouteVehicleLegDetails vehicleLegDetails()

        Details related to the vehicle leg.

        Returns:
        Details related to the vehicle leg.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)