|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.lbs.travel.TravelTime
public final class TravelTime
An instance of this class is returned by the TravelTimeEstimator
class to provide the travel time estimate. This class also provides the
original values that were used to determine the travel time estimate.
This class provides a default constructor and setter method. These methods
can be used to construct a TravelTime object for general purpose
use, such as automated testing.
TravelTimeEstimator| Field Summary | ||
|---|---|---|
static long |
START_NOW
Indicates that travel will start immediately. |
|
| Constructor Summary | ||
|---|---|---|
TravelTime()
Constructs a TravelTime object for general purpose use, such
as automated testing. |
||
TravelTime(TravelTime travelTime)
Creates a deep copy of the specified TravelTime object. |
||
| Method Summary | ||
|---|---|---|
long |
getDistance()
Retrieves the distance along the path of the route from the starting point to the ending point. |
|
long |
getElapsedTime()
Retrieves the estimated travel time between the starting and ending points. |
|
Coordinates |
getEnd()
Retrieves the destination point. |
|
long |
getEndTime()
Retrieves the arrival time at the destination. |
|
TravelTimeOptions |
getOptions()
Retrieves the options specified when requesting a travel time estimate. |
|
TravelTimeRequest |
getRequest()
Retrieves an object representing the request that produced this estimate. |
|
Coordinates |
getStart()
Retrieves the starting point. |
|
long |
getStartTime()
Retrieves the time at which travel is to start. |
|
void |
setDistance(long distance)
Sets the distance along the path of the route from the starting point to the ending point. |
|
void |
setElapsedTime(long elapsedTime)
Sets the estimated travel time between the starting and ending points. |
|
void |
setEnd(Coordinates end)
Sets the destination point. |
|
void |
setEndTime(long endTime)
Sets the arrival time at the destination. |
|
void |
setOptions(TravelTimeOptions options)
Sets the options when requesting a travel time estimate. |
|
void |
setStart(Coordinates start)
Sets the starting point. |
|
void |
setStartTime(long startTime)
Sets the time at which travel is to start. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long START_NOW
| Constructor Detail |
|---|
public TravelTime()
TravelTime object for general purpose use, such
as automated testing.
TravelTime objects are normally constructed and returned from a travel
time estimate request that was made using the methods in the
TravelTimeEstimator class.
public TravelTime(TravelTime travelTime)
TravelTime object.
travelTime - The object to be copied| Method Detail |
|---|
public TravelTimeRequest getRequest()
null if the TravelTime object was not created as a
result of a travel time estimate request.public Coordinates getStart()
public void setStart(Coordinates start)
start - Coordinates representing the starting point.
Note: The Coordinates class is mutable and this method does
not make a copy of the object.
public Coordinates getEnd()
public void setEnd(Coordinates end)
end - The destination point.
Note: The Coordinates class is mutable and this method does
not make a copy of the object.
public long getStartTime()
TravelTime.START_NOW was specified when you requested the travel time
estimate, this method returns the actual time at which the estimate was
received from the Travel Time service.
java.util.Date.getTime() method.public void setStartTime(long startTime)
startTime - The time at which travel is to start. The value is the
number of milliseconds since January 1, 1970, 00:00:00 GMT, which
is the value returned by the java.util.Date.getTime() method. To indicate that travel will
start immediately, pass TravelTime.START_NOW.public long getEndTime()
java.util.Date.getTime() method.public void setEndTime(long endTime)
endTime - The arrival time at the destination. The value is the
number of milliseconds since January 1, 1970, 00:00:00 GMT, which
is the value returned by the java.util.Date.getTime() method.public TravelTimeOptions getOptions()
null if no options
were specified.public void setOptions(TravelTimeOptions options)
options - The estimate request options or null if no
options are used.
Note: The TravelTimeOptions class is mutable and this
method does not make a copy of the object.
public long getElapsedTime()
public void setElapsedTime(long elapsedTime)
elapsedTime - The estimated number of milliseconds to travel from
the starting point to the ending point.public long getDistance()
public void setDistance(long distance)
distance - The distance in meters along the path of the route from
the starting point to the ending point.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal