Interface Route.Builder

    • Method Detail

      • legs

        Route.Builder legs​(Collection<RouteLeg> legs)

        A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

        Parameters:
        legs - A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • legs

        Route.Builder legs​(RouteLeg... legs)

        A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

        Parameters:
        legs - A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • legs

        Route.Builder legs​(Consumer<RouteLeg.Builder>... legs)

        A leg is a section of a route from one waypoint to the next. A leg could be of type Vehicle, Pedestrian or Ferry. Legs of different types could occur together within a single route. For example, a car employing the use of a Ferry will contain Vehicle legs corresponding to journey on land, and Ferry legs corresponding to the journey via Ferry.

        This is a convenience method that creates an instance of the RouteLeg.Builder avoiding the need to create one manually via RouteLeg.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #legs(List).

        Parameters:
        legs - a consumer that will call methods on RouteLeg.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #legs(java.util.Collection)
      • majorRoadLabels

        Route.Builder majorRoadLabels​(Collection<RouteMajorRoadLabel> majorRoadLabels)

        Important labels including names and route numbers that differentiate the current route from the alternatives presented.

        Parameters:
        majorRoadLabels - Important labels including names and route numbers that differentiate the current route from the alternatives presented.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • majorRoadLabels

        Route.Builder majorRoadLabels​(RouteMajorRoadLabel... majorRoadLabels)

        Important labels including names and route numbers that differentiate the current route from the alternatives presented.

        Parameters:
        majorRoadLabels - Important labels including names and route numbers that differentiate the current route from the alternatives presented.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • summary

        Route.Builder summary​(RouteSummary summary)

        Summarized details of the leg.

        Parameters:
        summary - Summarized details of the leg.
        Returns:
        Returns a reference to this object so that method calls can be chained together.