com.mapquest
Class TrekRoute

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.TrekRoute
All Implemented Interfaces:
java.lang.Cloneable

public class TrekRoute
extends MQObject

Class to hold the results from one leg of a route

See Also:
ManeuverCollection, LatLngCollection

Field Summary
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
 
Fields inherited from class com.mapquest.MQObject
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
TrekRoute()
          constructor
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 float getDistance()
          Returns the distance for this TrekRoute built from the maneuvers.
 ManeuverCollection getManeuvers()
          Returns the maneuvers for this TrekRoute.
 LatLngCollection getShapePoints()
          Returns all shape points from each maneuver in this leg of the route.
 int getTime()
          Returns the time in seconds to travel this TrekRoute built from the maneuvers.
 int hashCode()
          Returns a hash code for this TrekRoute.
 void init()
          Initializes object.
 
Methods inherited from class com.mapquest.MQObject
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

TrekRoute

public TrekRoute()
constructor

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class MQObject

getClassId

public int getClassId()
Returns the numeric id of this class.

Overrides:
getClassId in class MQObject
Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Overrides:
getClassName in class MQObject
Returns:
the text name of this class.

getDistance

public float getDistance()
Returns the distance for this TrekRoute built from the maneuvers.


getTime

public int getTime()
Returns the time in seconds to travel this TrekRoute built from the maneuvers.


getShapePoints

public LatLngCollection getShapePoints()
Returns all shape points from each maneuver in this leg of the route.

Returns:
all shape points from each maneuver in this leg of the route.

getManeuvers

public ManeuverCollection getManeuvers()
Returns the maneuvers for this TrekRoute.


equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a TrekRoute object that has same attributes as this object.

Overrides:
equals in class MQObject
Parameters:
otherObject - the object to compare this TrekRoute against.
Returns:
true if the TrekRoute objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this TrekRoute.

Overrides:
hashCode in class MQObject
Returns:
a hash code value for this TrekRoute.