public class

Route

extends Object
java.lang.Object
   ↳ com.esri.core.tasks.na.Route

Class Overview

Class holding the information for a single route. Routes are obtained for example by solving a route task or a closest facility task and processing the result.

Summary

Public Methods
boolean equals(Object obj)
Envelope getEnvelope()
Gets the envelope encompassing the route.
Graphic getRouteGraphic()
Gets the graphic for the full route (polyline).
String getRouteName()
Gets the name of the route.
List<RouteDirection> getRoutingDirections()
Gets the list of turn-by-turn directions for this route.
double getTotalCost(String name)
Gets the cost for a give attribute.
double getTotalKilometers()
Gets the total length of the route (kilometers).
double getTotalMiles()
Gets the total length of the route (miles).
double getTotalMinutes()
Gets the total time of the route.
double getTotalViolationMinutes()
Gets the total amount of additional time incurred due to time window violations.
double getTotalWaitMinutes()
Gets the total amount of additional time incurred due to waiting at time windows.
int hashCode()
String toString()
Returns a string representation of the class.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public Envelope getEnvelope ()

Gets the envelope encompassing the route.

Returns
Envelope the envelope encompassing the route

public Graphic getRouteGraphic ()

Gets the graphic for the full route (polyline).

Note: the graphic returned is not guaranteed to have a symbol. It may be necessary to update the symbol after it has been added to a graphics layer or create a new graphic with the Geometry of the returned graphic.

Returns
Graphic the route graphic for the full route

public String getRouteName ()

Gets the name of the route.

Returns
String the name of the route

public List<RouteDirection> getRoutingDirections ()

Gets the list of turn-by-turn directions for this route.

Returns
List<RouteDirection> the list of turn-by-turn directions for this route

public double getTotalCost (String name)

Gets the cost for a give attribute.

Parameters
name String: The name of the attribute name e.g. "Minutes" or "TravelTime"
Returns
double The associated cost for this attribute name

public double getTotalKilometers ()

Gets the total length of the route (kilometers).

Returns
double the total length of the route in kilometers

public double getTotalMiles ()

Gets the total length of the route (miles).

Returns
double the total length of the route in miles

public double getTotalMinutes ()

Gets the total time of the route. This includes any travel time, time spent waiting at stops (arriving before the start of a time window), and service time at stops.

Returns
double the total time of the route in minutes

public double getTotalViolationMinutes ()

Gets the total amount of additional time incurred due to time window violations.

Returns
double the total amount, in minutes, of time window violation

public double getTotalWaitMinutes ()

Gets the total amount of additional time incurred due to waiting at time windows.

Returns
double the total amount, in minutes, of time spent waiting at time windows

public int hashCode ()

Returns
int

public String toString ()

Returns a string representation of the class. The format and content of the returned string is not part of the contract of the method and is subject to change in any future release or patch without further notice.

Returns
String