public abstract class LegAnnotation extends DirectionsJsonObject
Modifier and Type | Class and Description |
---|---|
static class |
LegAnnotation.Builder
This builder can be used to set the values describing the
LegAnnotation . |
Constructor and Description |
---|
LegAnnotation() |
Modifier and Type | Method and Description |
---|---|
static LegAnnotation.Builder |
builder()
Create a new instance of this class by using the
LegAnnotation.Builder class. |
abstract java.util.List<java.lang.String> |
congestion()
The congestion between each pair of coordinates.
|
abstract java.util.List<java.lang.Double> |
distance()
The distance, in meters, between each pair of coordinates.
|
abstract java.util.List<java.lang.Double> |
duration()
The speed, in meters per second, between each pair of coordinates.
|
static LegAnnotation |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.util.List<MaxSpeed> |
maxspeed()
The posted speed limit, between each pair of coordinates.
|
abstract java.util.List<java.lang.Double> |
speed()
The speed, in meters per second, between each pair of coordinates.
|
abstract LegAnnotation.Builder |
toBuilder()
Convert the current
LegAnnotation to its builder holding the currently assigned
values. |
static com.google.gson.TypeAdapter<LegAnnotation> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
toJson
public static LegAnnotation.Builder builder()
LegAnnotation.Builder
class.LegAnnotation.Builder
for creating a new instance@Nullable public abstract java.util.List<java.lang.Double> distance()
@Nullable public abstract java.util.List<java.lang.Double> duration()
@Nullable public abstract java.util.List<java.lang.Double> speed()
@Nullable public abstract java.util.List<MaxSpeed> maxspeed()
MaxSpeed
value between two of
the routeLeg geometry coordinates@Nullable public abstract java.util.List<java.lang.String> congestion()
public abstract LegAnnotation.Builder toBuilder()
LegAnnotation
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 LegAnnotation
.LegAnnotation.Builder
with the same values set to match the ones defined
in this LegAnnotation
public static com.google.gson.TypeAdapter<LegAnnotation> typeAdapter(com.google.gson.Gson gson)
gson
- the built Gson
objectpublic static LegAnnotation fromJson(java.lang.String json)
json
- a formatted valid JSON string defining a LegAnnotation