@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CalculateRouteResult extends AmazonWebServiceResult<ResponseMetadata> implements Serializable, Cloneable
Returns the result of the route calculation. Metadata includes legs and route summary.
Constructor and Description |
---|
CalculateRouteResult() |
Modifier and Type | Method and Description |
---|---|
CalculateRouteResult |
clone() |
boolean |
equals(Object obj) |
List<Leg> |
getLegs()
Contains details about each path between a pair of positions included along a route such as:
StartPosition , EndPosition , Distance , DurationSeconds ,
Geometry , and Steps . |
CalculateRouteSummary |
getSummary()
Contains information about the whole route, such as:
RouteBBox , DataSource ,
Distance , DistanceUnit , and DurationSeconds . |
int |
hashCode() |
void |
setLegs(Collection<Leg> legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition , EndPosition , Distance , DurationSeconds ,
Geometry , and Steps . |
void |
setSummary(CalculateRouteSummary summary)
Contains information about the whole route, such as:
RouteBBox , DataSource ,
Distance , DistanceUnit , and DurationSeconds . |
String |
toString()
Returns a string representation of this object.
|
CalculateRouteResult |
withLegs(Collection<Leg> legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition , EndPosition , Distance , DurationSeconds ,
Geometry , and Steps . |
CalculateRouteResult |
withLegs(Leg... legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition , EndPosition , Distance , DurationSeconds ,
Geometry , and Steps . |
CalculateRouteResult |
withSummary(CalculateRouteSummary summary)
Contains information about the whole route, such as:
RouteBBox , DataSource ,
Distance , DistanceUnit , and DurationSeconds . |
getSdkHttpMetadata, getSdkResponseMetadata, setSdkHttpMetadata, setSdkResponseMetadata
public List<Leg> getLegs()
Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than the
total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the waypoint
positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the destination
position.
StartPosition
, EndPosition
, Distance
, DurationSeconds
, Geometry
, and Steps
. The number of legs returned corresponds to one fewer
than the total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the
waypoint positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the
destination position.
public void setLegs(Collection<Leg> legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than the
total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the waypoint
positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the destination
position.
legs
- Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than
the total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the
waypoint positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the
destination position.
public CalculateRouteResult withLegs(Leg... legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than the
total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the waypoint
positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the destination
position.
NOTE: This method appends the values to the existing list (if any). Use
setLegs(java.util.Collection)
or withLegs(java.util.Collection)
if you want to override the
existing values.
legs
- Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than
the total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the
waypoint positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the
destination position.
public CalculateRouteResult withLegs(Collection<Leg> legs)
Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than the
total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the waypoint
positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the destination
position.
legs
- Contains details about each path between a pair of positions included along a route such as:
StartPosition
, EndPosition
, Distance
, DurationSeconds
,
Geometry
, and Steps
. The number of legs returned corresponds to one fewer than
the total number of positions in the request.
For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:
The StartPosition
is the departure position.
The EndPosition
is the destination position.
A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:
Leg 1: The StartPosition
is the departure position . The EndPosition
is the
waypoint positon.
Leg 2: The StartPosition
is the waypoint position. The EndPosition
is the
destination position.
public void setSummary(CalculateRouteSummary summary)
Contains information about the whole route, such as: RouteBBox
, DataSource
,
Distance
, DistanceUnit
, and DurationSeconds
.
summary
- Contains information about the whole route, such as: RouteBBox
, DataSource
,
Distance
, DistanceUnit
, and DurationSeconds
.public CalculateRouteSummary getSummary()
Contains information about the whole route, such as: RouteBBox
, DataSource
,
Distance
, DistanceUnit
, and DurationSeconds
.
RouteBBox
, DataSource
,
Distance
, DistanceUnit
, and DurationSeconds
.public CalculateRouteResult withSummary(CalculateRouteSummary summary)
Contains information about the whole route, such as: RouteBBox
, DataSource
,
Distance
, DistanceUnit
, and DurationSeconds
.
summary
- Contains information about the whole route, such as: RouteBBox
, DataSource
,
Distance
, DistanceUnit
, and DurationSeconds
.public String toString()
toString
in class Object
Object.toString()
public CalculateRouteResult clone()