public abstract class MapMatchingResponse
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
MapMatchingResponse.Builder
This builder can be used to set the values describing the
MapMatchingResponse . |
Constructor and Description |
---|
MapMatchingResponse() |
Modifier and Type | Method and Description |
---|---|
static MapMatchingResponse.Builder |
builder()
Create a new instance of this class by using the
MapMatchingResponse.Builder class. |
abstract java.lang.String |
code()
A string depicting the state of the response.
|
static MapMatchingResponse |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.util.List<MapMatchingMatching> |
matchings()
List of
MapMatchingMatching objects, essentially a DirectionsWaypoint object with the
addition of a confidence value. |
abstract java.lang.String |
message()
Optionally shows up in a directions response if an error or something unexpected occurred.
|
abstract MapMatchingResponse.Builder |
toBuilder()
Convert the current
MapMatchingResponse to its builder holding the currently assigned
values. |
abstract java.util.List<MapMatchingTracepoint> |
tracepoints()
A list of
MapMatchingTracepoint objects representing the location an input point was
matched with. |
static com.google.gson.TypeAdapter<MapMatchingResponse> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
public static MapMatchingResponse.Builder builder()
MapMatchingResponse.Builder
class.MapMatchingResponse.Builder
for creating a new instance@NonNull public abstract java.lang.String code()
mapbox.driving
, mapbox.walking
,
or mapbox.cycling
.@Nullable public abstract java.lang.String message()
@Nullable public abstract java.util.List<MapMatchingMatching> matchings()
MapMatchingMatching
objects, essentially a DirectionsWaypoint object with the
addition of a confidence value.MapMatchingMatching
objects@Nullable public abstract java.util.List<MapMatchingTracepoint> tracepoints()
MapMatchingTracepoint
objects representing the location an input point was
matched with. list of Waypoint objects representing all input points of the trace in the order
they were matched. If a trace point is omitted by map matching because it is an outlier, the
entry will be null.public abstract MapMatchingResponse.Builder toBuilder()
MapMatchingResponse
to its builder holding the currently assigned
values. This allows you to modify a single variable and then rebuild the object resulting in
an updated and modified MapMatchingResponse
.MapMatchingResponse.Builder
with the same values set to match the ones
defined in this MapMatchingResponse
public static com.google.gson.TypeAdapter<MapMatchingResponse> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static MapMatchingResponse fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a GeoJson Map Matching response