public abstract class DirectionsWaypoint extends DirectionsJsonObject
Modifier and Type | Class and Description |
---|---|
static class |
DirectionsWaypoint.Builder
This builder can be used to set the values describing the
DirectionsWaypoint . |
Constructor and Description |
---|
DirectionsWaypoint() |
Modifier and Type | Method and Description |
---|---|
static DirectionsWaypoint.Builder |
builder()
Create a new instance of this class by using the
DirectionsWaypoint.Builder class. |
abstract java.lang.Double |
distance()
The straight-line distance from the coordinate specified in the query
to the location it was snapped to.
|
static DirectionsWaypoint |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
com.mapbox.geojson.Point |
location()
A
Point representing this waypoint location. |
abstract java.lang.String |
name()
Provides the way name which the waypoint's coordinate is snapped to.
|
abstract DirectionsWaypoint.Builder |
toBuilder()
Convert the current
DirectionsWaypoint to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<DirectionsWaypoint> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
getUnrecognizedJsonProperties, getUnrecognizedPropertiesNames, getUnrecognizedProperty, toJson
public static DirectionsWaypoint.Builder builder()
DirectionsWaypoint.Builder
class.DirectionsWaypoint.Builder
for creating a new instance@NonNull public abstract java.lang.String name()
@NonNull public com.mapbox.geojson.Point location()
Point
representing this waypoint location. This point is snapped to the road network.@Nullable public abstract java.lang.Double distance()
public abstract DirectionsWaypoint.Builder toBuilder()
DirectionsWaypoint
to its builder holding the currently assigned
values. This allows you to modify a single property and then rebuild the object resulting in
an updated and modified DirectionsWaypoint
.DirectionsWaypoint.Builder
with the same values set to match the ones defined
in this DirectionsWaypoint
public static com.google.gson.TypeAdapter<DirectionsWaypoint> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static DirectionsWaypoint fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a DirectionsWaypoint