com.mapquest
Class Maneuver

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

public class Maneuver
extends MQObject

This object will hold each maneuver of a trekroute returned from a route

See Also:
IntCollection, LatLngCollection, SignCollection, StringCollection

Field Summary
static int ATTRIBUTE_FERRY
           
static int ATTRIBUTE_GATE
           
static int ATTRIBUTE_PORTIONS_TOLL
           
static int ATTRIBUTE_PORTIONS_UNPAVED
           
static int ATTRIBUTE_POSSIBLE_SEASONAL_ROAD_CLOSURE
           
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
static int EAST_HEADING
          Deprecated. Use HEADING_EAST instead.
static int HEADING_EAST
           
static int HEADING_NORTH
           
static int HEADING_NORTH_EAST
           
static int HEADING_NORTH_WEST
           
static int HEADING_NULL
           
static int HEADING_SOUTH
           
static int HEADING_SOUTH_EAST
           
static int HEADING_SOUTH_WEST
           
static int HEADING_WEST
           
static int NORTH_EAST_HEADING
          Deprecated. Use HEADING_NORTH_EAST instead.
static int NORTH_HEADING
          Deprecated. Use HEADING_NORTH instead.
static int NORTH_WEST_HEADING
          Deprecated. Use HEADING_NORTH_WEST instead.
static int NULL_HEADING
          Deprecated. Use HEADING_NULL instead.
static int SOUTH_EAST_HEADING
          Deprecated. Use HEADING_SOUTH_EAST instead.
static int SOUTH_HEADING
          Deprecated. Use HEADING_SOUTH instead.
static int SOUTH_WEST_HEADING
          Deprecated. Use HEADING_SOUTH_WEST instead.
static int TURN_TYPE_LEFT
           
static int TURN_TYPE_LEFT_FORK
           
static int TURN_TYPE_LEFT_MERGE
           
static int TURN_TYPE_LEFT_OFF_RAMP
           
static int TURN_TYPE_LEFT_ON_RAMP
           
static int TURN_TYPE_LEFT_UTURN
           
static int TURN_TYPE_REVERSE
           
static int TURN_TYPE_RIGHT
           
static int TURN_TYPE_RIGHT_FORK
           
static int TURN_TYPE_RIGHT_MERGE
           
static int TURN_TYPE_RIGHT_OFF_RAMP
           
static int TURN_TYPE_RIGHT_ON_RAMP
           
static int TURN_TYPE_RIGHT_UTURN
           
static int TURN_TYPE_SHARP_LEFT
           
static int TURN_TYPE_SHARP_RIGHT
           
static int TURN_TYPE_SLIGHT_LEFT
           
static int TURN_TYPE_SLIGHT_RIGHT
           
static int TURN_TYPE_STRAIGHT
           
static int TURN_TYPE_STRAIGHT_FORK
           
static int WEST_HEADING
          Deprecated. Use HEADING_WEST instead.
 
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
Maneuver()
          Constructor.
 
Method Summary
 int clear()
          Initializes the object to its defaults.
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 int getAttributes()
          Get the attributes associated with this maneuver.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 int getDirection()
          Returns an integer representing the direction for this Maneuver.
 java.lang.String getDirectionName()
          Returns a string representing the direction for this Maneuver.
 float getDistance()
          Returns the distance of this Maneuver.
 IntCollection getGEFIDs()
          Returns an IntCollection containing the GEFIDs representing this Maneuver.
 java.lang.String getNarrative()
          Returns a string representing the narrative for this Maneuver.
 LatLngCollection getShapePoints()
          Returns a LatLngCollection containing the Points representing this Maneuver.
 SignCollection getSigns()
          Get the Signs present in this maneuver.
 StringCollection getStreets()
          Get the street name list.
 int getTime()
          Returns the seconds to travel this Maneuver.
 int getTurnType()
          Returns the turn type of this Maneuver.
 int hashCode()
          Returns a hash code for this Maneuver.
 void init()
          Initializes object.
 void setAttributes(int attributes)
          Set the attributes associated with this maneuver.
 void setDirection(int direction)
          Sets an integer representing the direction for this Maneuver.
 void setDistance(float distance)
          Sets the distance of this Maneuver.
 void setNarrative(java.lang.String narrative)
          Sets a string representing the narrative for this Maneuver.
 void setTime(int seconds)
          Sets the seconds to travel this Maneuver.
 void setTurnType(int type)
          Sets the turn type of this Maneuver.
 
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

NULL_HEADING

public static final int NULL_HEADING
Deprecated. Use HEADING_NULL instead.

See Also:
Constant Field Values

NORTH_HEADING

public static final int NORTH_HEADING
Deprecated. Use HEADING_NORTH instead.

See Also:
Constant Field Values

NORTH_WEST_HEADING

public static final int NORTH_WEST_HEADING
Deprecated. Use HEADING_NORTH_WEST instead.

See Also:
Constant Field Values

NORTH_EAST_HEADING

public static final int NORTH_EAST_HEADING
Deprecated. Use HEADING_NORTH_EAST instead.

See Also:
Constant Field Values

SOUTH_HEADING

public static final int SOUTH_HEADING
Deprecated. Use HEADING_SOUTH instead.

See Also:
Constant Field Values

SOUTH_EAST_HEADING

public static final int SOUTH_EAST_HEADING
Deprecated. Use HEADING_SOUTH_EAST instead.

See Also:
Constant Field Values

SOUTH_WEST_HEADING

public static final int SOUTH_WEST_HEADING
Deprecated. Use HEADING_SOUTH_WEST instead.

See Also:
Constant Field Values

WEST_HEADING

public static final int WEST_HEADING
Deprecated. Use HEADING_WEST instead.

See Also:
Constant Field Values

EAST_HEADING

public static final int EAST_HEADING
Deprecated. Use HEADING_EAST instead.

See Also:
Constant Field Values

HEADING_NULL

public static final int HEADING_NULL
See Also:
Constant Field Values

HEADING_NORTH

public static final int HEADING_NORTH
See Also:
Constant Field Values

HEADING_NORTH_WEST

public static final int HEADING_NORTH_WEST
See Also:
Constant Field Values

HEADING_NORTH_EAST

public static final int HEADING_NORTH_EAST
See Also:
Constant Field Values

HEADING_SOUTH

public static final int HEADING_SOUTH
See Also:
Constant Field Values

HEADING_SOUTH_EAST

public static final int HEADING_SOUTH_EAST
See Also:
Constant Field Values

HEADING_SOUTH_WEST

public static final int HEADING_SOUTH_WEST
See Also:
Constant Field Values

HEADING_WEST

public static final int HEADING_WEST
See Also:
Constant Field Values

HEADING_EAST

public static final int HEADING_EAST
See Also:
Constant Field Values

TURN_TYPE_STRAIGHT

public static final int TURN_TYPE_STRAIGHT
See Also:
Constant Field Values

TURN_TYPE_SLIGHT_RIGHT

public static final int TURN_TYPE_SLIGHT_RIGHT
See Also:
Constant Field Values

TURN_TYPE_RIGHT

public static final int TURN_TYPE_RIGHT
See Also:
Constant Field Values

TURN_TYPE_SHARP_RIGHT

public static final int TURN_TYPE_SHARP_RIGHT
See Also:
Constant Field Values

TURN_TYPE_REVERSE

public static final int TURN_TYPE_REVERSE
See Also:
Constant Field Values

TURN_TYPE_SHARP_LEFT

public static final int TURN_TYPE_SHARP_LEFT
See Also:
Constant Field Values

TURN_TYPE_LEFT

public static final int TURN_TYPE_LEFT
See Also:
Constant Field Values

TURN_TYPE_SLIGHT_LEFT

public static final int TURN_TYPE_SLIGHT_LEFT
See Also:
Constant Field Values

TURN_TYPE_RIGHT_UTURN

public static final int TURN_TYPE_RIGHT_UTURN
See Also:
Constant Field Values

TURN_TYPE_LEFT_UTURN

public static final int TURN_TYPE_LEFT_UTURN
See Also:
Constant Field Values

TURN_TYPE_RIGHT_MERGE

public static final int TURN_TYPE_RIGHT_MERGE
See Also:
Constant Field Values

TURN_TYPE_LEFT_MERGE

public static final int TURN_TYPE_LEFT_MERGE
See Also:
Constant Field Values

TURN_TYPE_RIGHT_ON_RAMP

public static final int TURN_TYPE_RIGHT_ON_RAMP
See Also:
Constant Field Values

TURN_TYPE_LEFT_ON_RAMP

public static final int TURN_TYPE_LEFT_ON_RAMP
See Also:
Constant Field Values

TURN_TYPE_RIGHT_OFF_RAMP

public static final int TURN_TYPE_RIGHT_OFF_RAMP
See Also:
Constant Field Values

TURN_TYPE_LEFT_OFF_RAMP

public static final int TURN_TYPE_LEFT_OFF_RAMP
See Also:
Constant Field Values

TURN_TYPE_RIGHT_FORK

public static final int TURN_TYPE_RIGHT_FORK
See Also:
Constant Field Values

TURN_TYPE_LEFT_FORK

public static final int TURN_TYPE_LEFT_FORK
See Also:
Constant Field Values

TURN_TYPE_STRAIGHT_FORK

public static final int TURN_TYPE_STRAIGHT_FORK
See Also:
Constant Field Values

ATTRIBUTE_PORTIONS_TOLL

public static final int ATTRIBUTE_PORTIONS_TOLL
See Also:
Constant Field Values

ATTRIBUTE_PORTIONS_UNPAVED

public static final int ATTRIBUTE_PORTIONS_UNPAVED
See Also:
Constant Field Values

ATTRIBUTE_POSSIBLE_SEASONAL_ROAD_CLOSURE

public static final int ATTRIBUTE_POSSIBLE_SEASONAL_ROAD_CLOSURE
See Also:
Constant Field Values

ATTRIBUTE_GATE

public static final int ATTRIBUTE_GATE
See Also:
Constant Field Values

ATTRIBUTE_FERRY

public static final int ATTRIBUTE_FERRY
See Also:
Constant Field Values
Constructor Detail

Maneuver

public Maneuver()
Constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class MQObject

clear

public int clear()
Initializes the object to its defaults.


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.

setTurnType

public void setTurnType(int type)
Sets the turn type of this Maneuver.

Parameters:
type - integer that is a valid turn type Valid types are the constants starting with K_

getTurnType

public int getTurnType()
Returns the turn type of this Maneuver.


setDistance

public void setDistance(float distance)
Sets the distance of this Maneuver.


getDistance

public float getDistance()
Returns the distance of this Maneuver.


setTime

public void setTime(int seconds)
Sets the seconds to travel this Maneuver.


getTime

public int getTime()
Returns the seconds to travel this Maneuver.


setDirection

public void setDirection(int direction)
Sets an integer representing the direction for this Maneuver.


getDirection

public int getDirection()
Returns an integer representing the direction for this Maneuver.


getDirectionName

public java.lang.String getDirectionName()
Returns a string representing the direction for this Maneuver.


setAttributes

public void setAttributes(int attributes)
Set the attributes associated with this maneuver.

Parameters:
attributes - an ordered list of attributes associated with this maneuver.

getAttributes

public int getAttributes()
Get the attributes associated with this maneuver.

Returns:
ordered list of attributes associated with this maneuver.

getStreets

public StringCollection getStreets()
Get the street name list.

Returns:
the street name list.

getShapePoints

public LatLngCollection getShapePoints()
Returns a LatLngCollection containing the Points representing this Maneuver.


getGEFIDs

public IntCollection getGEFIDs()
Returns an IntCollection containing the GEFIDs representing this Maneuver.


getSigns

public SignCollection getSigns()
Get the Signs present in this maneuver.

Returns:
the Signs included in this maneuver.

setNarrative

public void setNarrative(java.lang.String narrative)
Sets a string representing the narrative for this Maneuver.


getNarrative

public java.lang.String getNarrative()
Returns a string representing the narrative for this Maneuver.


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 Maneuver object that has same attributes as this object.

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

hashCode

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

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