com.mapquest
Class CorridorSearchCriteria

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

public class CorridorSearchCriteria
extends SearchCriteria

Defines the criteria for a Corridor search. The corridor to be searched is defined by the latitude/longitude collection

See Also:
LatLng, LatLngCollection, DistanceUnits

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
CorridorSearchCriteria()
          Default 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.
 boolean getCorrExactLinks()
          Returns the exactLinks-whether to use generalization in determining corridor
 double getCorridorBufferWidth()
          Returns the width of the corridor buffer which defines the extent of the generalization.
 double getCorridorBufferWidth(DistanceUnits du)
          Returns the width of the corridor buffer which defines the extent of the generalization.
 double getCorridorWidth()
          Returns the width of the corridor which defines the extent of the search area.
 double getCorridorWidth(DistanceUnits du)
          Returns the width of the corridor which defines the extent of the search area.
 LatLngCollection getShapePoints()
          Returns the array of shape points in LatLngs used to form the corridor to search.
 int hashCode()
          Returns a hash code for this CorridorSearchCriteria.
 void init()
          Initializes object.
 void setCorrExactLinks(boolean bExactLinks)
          sets exactLinks-whether to use generalization in determining corridor
 void setCorridorBufferWidth(double dBufferWidth)
          Sets the buffer width which defines the amount to generalize.
 void setCorridorBufferWidth(double dBufferWidth, DistanceUnits du)
          Sets the buffer width which defines the amount to generalize.
 void setCorridorWidth(double dCorrWidth)
          Sets the Corridor width (miles) which defines the extent of the search area.
 void setCorridorWidth(double dCorrWidth, DistanceUnits du)
          Sets the Corridor width (miles) which defines the extent of the search area.
 void setShapePoints(LatLngCollection lla)
          Empties the array of shape points in LatLngs used to form the corridor to search and adds the members of the passed-in array.
 
Methods inherited from class com.mapquest.SearchCriteria
getMaxMatches, setMaxMatches
 
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

CorridorSearchCriteria

public CorridorSearchCriteria()
Default Constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class SearchCriteria

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.

getShapePoints

public LatLngCollection getShapePoints()
Returns the array of shape points in LatLngs used to form the corridor to search.


setShapePoints

public void setShapePoints(LatLngCollection lla)
Empties the array of shape points in LatLngs used to form the corridor to search and adds the members of the passed-in array.

Parameters:
lla - array of LatLngs to use.

setCorridorWidth

public void setCorridorWidth(double dCorrWidth)
Sets the Corridor width (miles) which defines the extent of the search area. Returns the width it was set to.

Parameters:
dCorrWidth - The corridor width that this object is to be set to.

setCorridorWidth

public void setCorridorWidth(double dCorrWidth,
                             DistanceUnits du)
Sets the Corridor width (miles) which defines the extent of the search area. Returns the width it was set to.

Parameters:
dCorrWidth - The corridor width that this object is to be set to.
du - DistanceUnits Miles or KiloMeters.

setCorridorBufferWidth

public void setCorridorBufferWidth(double dBufferWidth)
Sets the buffer width which defines the amount to generalize. Returns the width it was set to.

Parameters:
dBufferWidth - The corridor buffer that this object is to be set to.

setCorridorBufferWidth

public void setCorridorBufferWidth(double dBufferWidth,
                                   DistanceUnits du)
Sets the buffer width which defines the amount to generalize. Returns the width it was set to.

Parameters:
dBufferWidth - The corridor buffer that this object is to be set to.
du - DistanceUnits Miles or KiloMeters.

setCorrExactLinks

public void setCorrExactLinks(boolean bExactLinks)
sets exactLinks-whether to use generalization in determining corridor

Parameters:
bExactLinks - Enables/disables generalization in the server.

getCorridorWidth

public double getCorridorWidth()
Returns the width of the corridor which defines the extent of the search area.

Returns:
The width of the corridor which defines the extent of the search area.

getCorridorWidth

public double getCorridorWidth(DistanceUnits du)
Returns the width of the corridor which defines the extent of the search area.

Parameters:
du - DistanceUnits Miles or KiloMeters
Returns:
The width of the corridor which defines the extent of the search area.

getCorridorBufferWidth

public double getCorridorBufferWidth()
Returns the width of the corridor buffer which defines the extent of the generalization.

Returns:
The width of the corridor buffer which defines the extent of the generalization.

getCorridorBufferWidth

public double getCorridorBufferWidth(DistanceUnits du)
Returns the width of the corridor buffer which defines the extent of the generalization.

Parameters:
du - DistanceUnits Miles or KiloMeters
Returns:
The width of the corridor buffer which defines the extent of the generalization.

getCorrExactLinks

public boolean getCorrExactLinks()
Returns the exactLinks-whether to use generalization in determining corridor

Returns:
The value of exactLinks which is used to enable disable generalization

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

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

hashCode

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

Overrides:
hashCode in class SearchCriteria
Returns:
a hash code value for this CorridorSearchCriteria.