Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract RouteLeg.Builder |
admins(java.util.List<Admin> admins)
An array of objects describing the administrative boundaries the route leg travels through.
|
abstract RouteLeg.Builder |
annotation(LegAnnotation annotation)
A
LegAnnotation that contains additional details about each line segment along the
route geometry. |
abstract RouteLeg |
build()
Build a new
RouteLeg object. |
abstract RouteLeg.Builder |
closures(java.util.List<Closure> closures)
A list of closures that occur on this leg.
|
abstract RouteLeg.Builder |
distance(java.lang.Double distance)
The distance traveled from one waypoint to another.
|
abstract RouteLeg.Builder |
duration(java.lang.Double duration)
The estimated travel time from one waypoint to another.
|
abstract RouteLeg.Builder |
durationTypical(java.lang.Double durationTypical)
The typical travel time for traversing this RouteLeg.
|
abstract RouteLeg.Builder |
incidents(java.util.List<Incident> incidents)
A list of incidents that occur on this leg.
|
abstract RouteLeg.Builder |
steps(java.util.List<LegStep> steps)
Gives a List including all the steps to get from one waypoint to another.
|
abstract RouteLeg.Builder |
summary(java.lang.String summary)
A short human-readable summary of major roads traversed.
|
T |
unrecognizedJsonProperties(java.util.Map<java.lang.String,com.google.gson.JsonElement> unrecognizedProperties)
Use this method to add parameters which are not present in the model yet but are supported
on the Directions API side in the response.
|
abstract RouteLeg.Builder |
viaWaypoints(java.util.List<SilentWaypoint> viaWaypoints)
A list of silent waypoints which were used to request a route.
|
@NonNull public abstract RouteLeg.Builder viaWaypoints(@Nullable java.util.List<SilentWaypoint> viaWaypoints)
viaWaypoints
- a list of silent waypoints@NonNull public abstract RouteLeg.Builder distance(@Nullable java.lang.Double distance)
distance
- a double number with unit meters@NonNull public abstract RouteLeg.Builder duration(@Nullable java.lang.Double duration)
duration
- a double number with unit seconds@NonNull public abstract RouteLeg.Builder durationTypical(@Nullable java.lang.Double durationTypical)
durationTypical
- a double number with unit seconds@NonNull public abstract RouteLeg.Builder summary(@Nullable java.lang.String summary)
summary
- String with summary@NonNull public abstract RouteLeg.Builder admins(@Nullable java.util.List<Admin> admins)
StepIntersection.adminIndex()
on the intersection object
to look up the admin for each intersection in this array.admins
- Array with admins@NonNull public abstract RouteLeg.Builder steps(@Nullable java.util.List<LegStep> steps)
steps
- List of LegStep
@NonNull public abstract RouteLeg.Builder incidents(@Nullable java.util.List<Incident> incidents)
incidents
- a list of Incident
@NonNull public abstract RouteLeg.Builder annotation(@Nullable 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.annotation
- a LegAnnotation
object@NonNull public abstract RouteLeg.Builder closures(@Nullable java.util.List<Closure> closures)
closures
- a list of Closure
@NonNull public abstract RouteLeg build()
RouteLeg
object.RouteLeg
using the provided values in this builder@NonNull public T unrecognizedJsonProperties(@Nullable java.util.Map<java.lang.String,com.google.gson.JsonElement> unrecognizedProperties)
unrecognizedProperties
- parameters to add to request