Class RouteLegProgress.Builder
-
- All Implemented Interfaces:
public final class RouteLegProgress.BuilderBuilder of RouteLegProgress.
-
-
Constructor Summary
Constructors Constructor Description RouteLegProgress.Builder()
-
Method Summary
Modifier and Type Method Description final RouteLegProgress.BuilderlegIndex(Integer legIndex)Index representing the current leg the user is on. final RouteLegProgress.BuildergeometryIndex(Integer geometryIndex)final RouteLegProgress.BuilderrouteLeg(RouteLeg routeLeg)RouteLeg geometry final RouteLegProgress.BuilderdistanceTraveled(Float distanceTraveled)Total distance traveled in meters along current leg final RouteLegProgress.BuilderdistanceRemaining(Float distanceRemaining)The distance remaining in meters until the user reaches the end of the leg final RouteLegProgress.BuilderdurationRemaining(Double durationRemaining)The duration remaining in seconds until the user reaches the end of the current step final RouteLegProgress.BuilderfractionTraveled(Float fractionTraveled)The fraction traveled along the current leg, this is a float value between 0 and 1 and isn't guaranteed to reach 1 before the user reaches the next waypoint final RouteLegProgress.BuildercurrentStepProgress(RouteStepProgress currentStepProgress)RouteStepProgress object with information about the particular step the user is currently on final RouteLegProgress.BuilderupcomingStep(LegStep upcomingStep)Next/upcoming step immediately after the current step. final RouteLegProgressbuild()Build new instance of RouteLegProgress
-
-
-
Method Detail
-
legIndex
final RouteLegProgress.Builder legIndex(Integer legIndex)
Index representing the current leg the user is on. If the directions route currently in use contains more then two waypoints, the route is likely to have multiple legs representing the distance between the two points.
-
geometryIndex
final RouteLegProgress.Builder geometryIndex(Integer geometryIndex)
-
routeLeg
final RouteLegProgress.Builder routeLeg(RouteLeg routeLeg)
RouteLeg geometry
-
distanceTraveled
final RouteLegProgress.Builder distanceTraveled(Float distanceTraveled)
Total distance traveled in meters along current leg
-
distanceRemaining
final RouteLegProgress.Builder distanceRemaining(Float distanceRemaining)
The distance remaining in meters until the user reaches the end of the leg
-
durationRemaining
final RouteLegProgress.Builder durationRemaining(Double durationRemaining)
The duration remaining in seconds until the user reaches the end of the current step
-
fractionTraveled
final RouteLegProgress.Builder fractionTraveled(Float fractionTraveled)
The fraction traveled along the current leg, this is a float value between 0 and 1 and isn't guaranteed to reach 1 before the user reaches the next waypoint
-
currentStepProgress
final RouteLegProgress.Builder currentStepProgress(RouteStepProgress currentStepProgress)
RouteStepProgress object with information about the particular step the user is currently on
-
upcomingStep
final RouteLegProgress.Builder upcomingStep(LegStep upcomingStep)
Next/upcoming step immediately after the current step. If the user is on the last step on the last leg, this will return null since a next step doesn't exist
-
build
final RouteLegProgress build()
Build new instance of RouteLegProgress
-
-