com.mapquest
Class Address

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.Location
          extended bycom.mapquest.Address
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
GeoAddress

public class Address
extends Location

Contains information for geocoding and routing to and from addresses.

See Also:
Location, GeoAddress

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
Address()
          Default constructor.
Address(Address copy)
          Copy constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 java.lang.String getAdminArea(int nIndex)
          Returns the specified Admin Area of this Address.
 java.lang.String getCity()
          Returns the city field of this Address.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 java.lang.String getCountry()
          Returns the country field of this Address.
 java.lang.String getCounty()
          Returns the county field of this Address.
 java.lang.String getPostalCode()
          Returns the postal code field of this Address.
 java.lang.String getState()
          Returns the state field of this Address.
 java.lang.String getStreet()
          Returns street Address.
 int hashCode()
          Returns a hash code for this Address.
 void init()
          Initializes object.
 void setAdminArea(int nIndex, java.lang.String strString)
          Sets the specified Admin Area of this Address.
 void setCity(java.lang.String strCity)
          Sets the city field of this Address.
 void setCountry(java.lang.String strCountry)
          Sets the country field of this Address.
 void setCounty(java.lang.String strCounty)
          Sets the county field of this Address.
 void setPostalCode(java.lang.String strPostalCode)
          Sets the postal code field of this Address.
 void setState(java.lang.String strState)
          Sets the state field of this Address.
 void setStreet(java.lang.String strAddress)
          Sets street Address.
 
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

Address

public Address()
Default constructor.


Address

public Address(Address copy)
Copy constructor.

Parameters:
copy - Address to be copied
Method Detail

init

public void init()
Initializes object.

Overrides:
init in class Location

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.

setCity

public void setCity(java.lang.String strCity)
Sets the city field of this Address.

Parameters:
strCity - The city to which the city field of this Address is to be set.

setCounty

public void setCounty(java.lang.String strCounty)
Sets the county field of this Address.

Parameters:
strCounty - The county to which the county field of this Address is to be set.

setState

public void setState(java.lang.String strState)
Sets the state field of this Address.

Parameters:
strState - The state to which the state field of this Address is to be set.

setPostalCode

public void setPostalCode(java.lang.String strPostalCode)
Sets the postal code field of this Address.

Parameters:
strPostalCode - The postal code to which the postal code field of this Address is to be set.

setCountry

public void setCountry(java.lang.String strCountry)
Sets the country field of this Address.

Parameters:
strCountry - The country to which the country field of this Address is to be set.

setAdminArea

public void setAdminArea(int nIndex,
                         java.lang.String strString)
Sets the specified Admin Area of this Address.

Parameters:
nIndex - The specified Admin Area field of this Address.
strString - The value for this admin area

setStreet

public void setStreet(java.lang.String strAddress)
Sets street Address.

Parameters:
strAddress - Input street Address

getStreet

public java.lang.String getStreet()
Returns street Address.

Returns:
Street Address

getCity

public java.lang.String getCity()
Returns the city field of this Address.

Returns:
The city field of this Address.

getCounty

public java.lang.String getCounty()
Returns the county field of this Address.


getState

public java.lang.String getState()
Returns the state field of this Address.

Returns:
The state field of this Address.

getPostalCode

public java.lang.String getPostalCode()
Returns the postal code field of this Address.

Returns:
The Postal code field of this Address.

getCountry

public java.lang.String getCountry()
Returns the country field of this Address.

Returns:
The country field of this Address.

getAdminArea

public java.lang.String getAdminArea(int nIndex)
Returns the specified Admin Area of this Address.

Returns:
The specified Admin Area field of this Address.

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

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

hashCode

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

Overrides:
hashCode in class Location
Returns:
a hash code value for this Address.