Class Route
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.networkanalysis.Route
-
public final class Route extends Object
Represents an independent route within aRouteResult
.- Since:
- 100.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCost(String attributeName)
Gets the cost for the given attribute.List<DirectionManeuver>
getDirectionManeuvers()
Gets the turn-by-turn driving directions along this route.Calendar
getEndTime()
Gets the time when the route ends (arriving at the last stop).double
getEndTimeShift()
Gets shift for end time.Polyline
getRouteGeometry()
Gets the route geometry.String
getRouteName()
Gets the route name.Calendar
getStartTime()
Gets the time when the route begins (departing from the first stop).double
getStartTimeShift()
Gets shift for start time.List<Stop>
getStops()
Gets the stops visited along this route.double
getTotalLength()
Gets the total length of the Route in meters.double
getTotalTime()
Gets the overall time (in minutes) taken by the route from start to end.double
getTravelTime()
Gets the time (in minutes) to travel along the route.double
getViolationTime()
Gets the total number of minutes that exceed the permissible time windows for stops on this route, based on calculated arrival time at all the stops.double
getWaitTime()
Gets the time (in minutes) spent at stops waiting for time windows to open.
-
-
-
Method Detail
-
getRouteGeometry
public Polyline getRouteGeometry()
Gets the route geometry.- Returns:
- the route geometry
- Since:
- 100.0.0
-
getRouteName
public String getRouteName()
Gets the route name. Same asStop.getRouteName()
of the stops included in this route.- Returns:
- the route name
- Since:
- 100.0.0
-
getStops
public List<Stop> getStops()
Gets the stops visited along this route. Only available ifRouteParameters.setReturnStops(boolean)
is set. The sequence stops are visited in the route may be different from the order they are present in the list ifRouteParameters.setFindBestSequence(boolean)
is set.- Returns:
- an unmodifiable list of the stops
- Since:
- 100.0.0
-
getCost
public double getCost(String attributeName)
Gets the cost for the given attribute.- Parameters:
attributeName
- attribute name- Returns:
- the cost
- Throws:
IllegalArgumentException
- if attributeName is nullArcGISRuntimeException
- if attributeName is invalid- Since:
- 100.0.0
-
getTravelTime
public double getTravelTime()
Gets the time (in minutes) to travel along the route.- Returns:
- the travel time
- Since:
- 100.0.0
-
getTotalTime
public double getTotalTime()
Gets the overall time (in minutes) taken by the route from start to end. This includesgetTravelTime()
andgetWaitTime()
.- Returns:
- the total time
- Since:
- 100.0.0
-
getWaitTime
public double getWaitTime()
Gets the time (in minutes) spent at stops waiting for time windows to open. Only applicable if time windows were specified for stops.Stop.setTimeWindowStart(Calendar)
andStop.setTimeWindowEnd(Calendar)
can be used for specifying the time windows- Returns:
- the wait time
- Since:
- 100.0.0
-
getViolationTime
public double getViolationTime()
Gets the total number of minutes that exceed the permissible time windows for stops on this route, based on calculated arrival time at all the stops. Only applicable if time windows were specified for stops.Stop.setTimeWindowStart(Calendar)
andStop.setTimeWindowEnd(Calendar)
can be used for specifying the time windows- Returns:
- the violation time
- Since:
- 100.0.0
-
getStartTime
public Calendar getStartTime()
Gets the time when the route begins (departing from the first stop).- Returns:
- the local start time. Returns null if the local start time was not set in
RouteParameters.setStartTime(Calendar)
- Since:
- 100.0.0
-
getStartTimeShift
public double getStartTimeShift()
Gets shift for start time.- Returns:
- a value of time zone shift in minutes
- Since:
- 100.0.0
-
getEndTime
public Calendar getEndTime()
Gets the time when the route ends (arriving at the last stop).- Returns:
- the local end time. Returns null if the local start time was not set in set in
RouteParameters
- Since:
- 100.0.0
-
getEndTimeShift
public double getEndTimeShift()
Gets shift for end time.- Returns:
- a value of time zone shift in minutes
- Since:
- 100.0.0
-
getTotalLength
public double getTotalLength()
Gets the total length of the Route in meters.- Returns:
- the total route length in meters
- Since:
- 100.0.0
-
getDirectionManeuvers
public List<DirectionManeuver> getDirectionManeuvers()
Gets the turn-by-turn driving directions along this route. Only available ifRouteParameters.setReturnDirections(boolean)
is set.- Returns:
- an unmodifiable list of the direction maneuvers
- Since:
- 100.0.0
-
-