public abstract class RouteLeg extends DirectionsJsonObject
DirectionsWaypoint.| Modifier and Type | Class and Description |
|---|---|
static class |
RouteLeg.Builder
This builder can be used to set the values describing the
RouteLeg. |
| Constructor and Description |
|---|
RouteLeg() |
| Modifier and Type | Method and Description |
|---|---|
abstract LegAnnotation |
annotation()
A
LegAnnotation that contains additional details about each line segment along the
route geometry. |
static RouteLeg.Builder |
builder()
Create a new instance of this class by using the
RouteLeg.Builder class. |
abstract java.lang.Double |
distance()
The distance traveled from one waypoint to another.
|
abstract java.lang.Double |
duration()
The estimated travel time from one waypoint to another.
|
static RouteLeg |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.util.List<LegStep> |
steps()
Gives a List including all the steps to get from one waypoint to another.
|
abstract java.lang.String |
summary()
A short human-readable summary of major roads traversed.
|
abstract RouteLeg.Builder |
toBuilder()
Convert the current
RouteLeg to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<RouteLeg> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
toJsonpublic static RouteLeg.Builder builder()
RouteLeg.Builder class.RouteLeg.Builder for creating a new instance@Nullable public abstract java.lang.Double distance()
@Nullable public abstract java.lang.Double duration()
@Nullable public abstract java.lang.String summary()
@Nullable public abstract java.util.List<LegStep> steps()
LegStep@Nullable public abstract LegAnnotation annotation()
LegAnnotation that contains additional details about each line segment along the
route geometry. If you'd like to receiving this, you must request it inside your Directions
request before executing the call.LegAnnotation objectpublic abstract RouteLeg.Builder toBuilder()
RouteLeg 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 RouteLeg.RouteLeg.Builder with the same values set to match the ones defined
in this RouteLegpublic static com.google.gson.TypeAdapter<RouteLeg> typeAdapter(com.google.gson.Gson gson)
gson - the built Gson objectpublic static RouteLeg fromJson(java.lang.String json)
json - a formatted valid JSON string defining a RouteLeg