public abstract static class MapMatchingMatching.Builder
extends java.lang.Object
MapMatchingResponse
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract MapMatchingMatching |
build()
Build a new
MapMatchingMatching object. |
abstract MapMatchingMatching.Builder |
confidence(double confidence)
A number between 0 (low) and 1 (high) indicating level of confidence in the returned match.
|
abstract MapMatchingMatching.Builder |
distance(double distance)
The distance traveled from origin to destination.
|
abstract MapMatchingMatching.Builder |
duration(double duration)
The estimated travel time from origin to destination.
|
abstract MapMatchingMatching.Builder |
geometry(java.lang.String geometry)
Gives the geometry of the route.
|
abstract MapMatchingMatching.Builder |
legs(java.util.List<com.mapbox.api.directions.v5.models.RouteLeg> legs)
A Leg is a route between only two waypoints.
|
abstract MapMatchingMatching.Builder |
routeOptions(com.mapbox.api.directions.v5.models.RouteOptions routeOptions)
Holds onto the parameter information used when making the directions request.
|
abstract MapMatchingMatching.Builder |
voiceLanguage(java.lang.String voiceLanguage)
String of the language to be used for voice instructions.
|
abstract MapMatchingMatching.Builder |
weight(double weight)
The calculated weight of the route.
|
abstract MapMatchingMatching.Builder |
weightName(java.lang.String weightName)
The name of the weight profile used while calculating during extraction phase.
|
public abstract MapMatchingMatching.Builder distance(double distance)
distance
- a double number with unit meterspublic abstract MapMatchingMatching.Builder duration(double duration)
duration
- a double number with unit secondspublic abstract MapMatchingMatching.Builder geometry(@Nullable java.lang.String geometry)
geometry
- an encoded polyline stringpublic abstract MapMatchingMatching.Builder weight(double weight)
weight
- the weight value provided from the API as a double
valuepublic abstract MapMatchingMatching.Builder weightName(java.lang.String weightName)
routability
which is duration based, with additional penalties for less desirable
maneuvers.weightName
- a String representing the weight profile used while calculating the routepublic abstract MapMatchingMatching.Builder legs(java.util.List<com.mapbox.api.directions.v5.models.RouteLeg> legs)
legs
- list of RouteLeg
objectspublic abstract MapMatchingMatching.Builder confidence(double confidence)
confidence
- confidence valuepublic abstract MapMatchingMatching.Builder routeOptions(@Nullable com.mapbox.api.directions.v5.models.RouteOptions routeOptions)
routeOptions
- a RouteOptions
s object which holds onto critical information from
the request that cannot be derived directly from the directions routepublic abstract MapMatchingMatching.Builder voiceLanguage(@Nullable java.lang.String voiceLanguage)
MapboxMapMatching.language()
is not
compatible with API Voice.voiceLanguage
- String compatible with voice instructions, null otherwisepublic abstract MapMatchingMatching build()
MapMatchingMatching
object.MapMatchingMatching
using the provided values in this builder