com.mapquest
Class RadiusSearchCriteria

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

public class RadiusSearchCriteria
extends SearchCriteria

Defines the criteria for a radius search. The radius to be searched is defined by the latitude/longitude of the Center and the radius of the circle.

See Also:
LatLng, 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
RadiusSearchCriteria()
          Default Constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 LatLng getCenter()
          Returns the Center (latitude/longitude) of the circle which defines the extent of the search area.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 double getRadius()
          Returns the radius of the circle which defines the extent of the search area.
 double getRadius(DistanceUnits du)
          Returns the radius of the circle which defines the extent of the search area.
 int hashCode()
          Returns a hash code for this RadiusSearchCriteria.
 void init()
          Initializes object.
 void setCenter(LatLng ll)
          Sets the latitude and longitude values of the Center point of the circle which defines the extent of the search area.
 void setRadius(double dRad)
          Sets the radius of the circle which defines the extent of the search area.
 void setRadius(double dRad, DistanceUnits du)
          Sets the radius of the circle which defines the extent of the search area.
 
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

RadiusSearchCriteria

public RadiusSearchCriteria()
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.

setRadius

public void setRadius(double dRad)
Sets the radius of the circle which defines the extent of the search area.

Parameters:
dRad - The radius that this object is to be set to.

setRadius

public void setRadius(double dRad,
                      DistanceUnits du)
Sets the radius of the circle which defines the extent of the search area.

Parameters:
dRad - The radius that this object is to be set to.
du - DistanceUnits Miles or KiloMeters

setCenter

public void setCenter(LatLng ll)
Sets the latitude and longitude values of the Center point of the circle which defines the extent of the search area.

Parameters:
ll - The latitude/longitude values of the Center of this object.

getRadius

public double getRadius()
Returns the radius of the circle which defines the extent of the search area.

Returns:
The radius of the circle which defines the extent of the search area.

getRadius

public double getRadius(DistanceUnits du)
Returns the radius of the circle which defines the extent of the search area.

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

getCenter

public LatLng getCenter()
Returns the Center (latitude/longitude) of the circle which defines the extent of the search area.

Returns:
The Center latitude/longitude of the circle which defines the extent of the search area.

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

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

hashCode

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

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