Class DirectionsRequest.Builder

  • Enclosing class:
    DirectionsRequest

    public static final class DirectionsRequest.Builder
    extends Object
    DirectionsRequest builder static inner class.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • from

        @NonNull
        public DirectionsRequest.Builder from​(@NonNull
                                              Point from,
                                              @NonNull
                                              Angle bearingFrom)
        Sets the starting point of the route, and the bearing of the user to generate the appropriate instructions.
        Parameters:
        from - Point point inside a building (Point.isIndoor() == true)
        bearingFrom - Angle user's bearing
        Returns:
        a reference to this Builder, so that the methods can be chained together.
      • from

        @NonNull
        public DirectionsRequest.Builder from​(@NonNull
                                              Location currentLocation)
        Sets the current user's position as the starting point of the route.
        Parameters:
        currentLocation - current user's Location, obtained with LocationManager
        Returns:
        a reference to this Builder, so that the methods can be chained together.
      • to

        @NonNull
        public DirectionsRequest.Builder to​(@NonNull
                                            Point to)
        Sets the point to, where the route should end.
        Parameters:
        to - Point point inside a building (Point.isIndoor() == true)
        Returns:
        a reference to this Builder, so that the methods can be chained together.
      • isAccessible

        @NonNull
        @Deprecated
        public DirectionsRequest.Builder isAccessible​(boolean isAccessible)
        Deprecated.
        Sets if the route has to be suitable for wheel chairs (true) or not (false)
        Parameters:
        isAccessible - boolean
        Returns:
        a reference to this Builder, so that the methods can be chained together.
      • minimizeFloorChanges

        public DirectionsRequest.Builder minimizeFloorChanges​(boolean minimizeFloorChanges)
        Sets if you want to calculate a route minimizing the floor changes even if the route is longer. By default this is set to false, and it will calculate the shortest route.
        Returns:
        a reference to this Builder, so that the methods can be chained together.
      • build

        @NonNull
        public DirectionsRequest build()
        Returns a DirectionsRequest built from the parameters previously set.
        Returns:
        a DirectionsRequest built with parameters of this DirectionsRequest.Builder