Package es.situm.sdk.directions
Class DirectionsRequest.Builder
- java.lang.Object
-
- es.situm.sdk.directions.DirectionsRequest.Builder
-
- Enclosing class:
- DirectionsRequest
public static final class DirectionsRequest.Builder extends Object
DirectionsRequestbuilder static inner class.
-
-
Constructor Summary
Constructors Constructor Description Builder()Builder(DirectionsRequest copy)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DirectionsRequest.BuilderaccessibilityMode(DirectionsRequest.AccessibilityMode accessibilityMode)Deprecated.DirectionsRequestbuild()Returns aDirectionsRequestbuilt from the parameters previously set.DirectionsRequest.Builderfrom(Point from, Angle bearingFrom)Sets the starting point of the route, and the bearing of the user to generate the appropriate instructions.DirectionsRequest.Builderfrom(Location currentLocation)Sets the current user's position as the starting point of the route.DirectionsRequest.BuilderisAccessible(boolean isAccessible)Deprecated.DirectionsRequest.BuilderminimizeFloorChanges(boolean minimizeFloorChanges)Sets if you want to calculate a route minimizing the floor changes even if the route is longer.DirectionsRequest.Builderoptions(DirectionsOptions options)Sets additional information on how a route should be computed.DirectionsRequest.Builderto(Point to)Sets the pointto, where the route should end.
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(@NonNull DirectionsRequest copy)
-
-
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-Pointpoint inside a building (Point.isIndoor()== true)bearingFrom-Angleuser'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'sLocation, obtained withLocationManager- 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 pointto, where the route should end.- Parameters:
to-Pointpoint 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.
-
accessibilityMode
@Deprecated @NonNull public DirectionsRequest.Builder accessibilityMode(DirectionsRequest.AccessibilityMode accessibilityMode)
Deprecated.Sets the accessibility mode of the route.Default value is
DirectionsRequest.DEFAULT_ACCESSIBILITY_MODE- Parameters:
accessibilityMode-DirectionsRequest.AccessibilityMode- 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.
-
options
public DirectionsRequest.Builder options(DirectionsOptions options)
Sets additional information on how a route should be computed.- Parameters:
options-DirectionsOptionsinstance- Returns:
- a reference to this Builder, so that the methods can be chained together.
-
build
@NonNull public DirectionsRequest build()
Returns aDirectionsRequestbuilt from the parameters previously set.- Returns:
- a
DirectionsRequestbuilt with parameters of thisDirectionsRequest.Builder
-
-