com.gisgraphy.model
Class Address

java.lang.Object
  extended by com.gisgraphy.model.BaseObject
      extended by com.gisgraphy.model.Address
All Implemented Interfaces:
Serializable

public class Address
extends BaseObject
implements Serializable

This class is used to represent an address with address, city, province and postal-code information.

Author:
Matt Raible
See Also:
Serialized Form

Constructor Summary
Address()
           
 
Method Summary
 boolean equals(Object o)
          Overridden equals method for object comparison.
 String getAddress()
           
 String getCity()
           
 String getCountry()
           
 String getPostalCode()
           
 String getProvince()
           
 int hashCode()
          Overridden hashCode method - compares on address, city, province, country and postal code.
 void setAddress(String address)
           
 void setCity(String city)
           
 void setCountry(String country)
           
 void setPostalCode(String postalCode)
           
 void setProvince(String province)
           
 String toString()
          Returns a multi-line String with key=value pairs.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Address

public Address()
Method Detail

getAddress

public String getAddress()

getCity

public String getCity()

getProvince

public String getProvince()

getCountry

public String getCountry()

getPostalCode

public String getPostalCode()

setAddress

public void setAddress(String address)

setCity

public void setCity(String city)

setCountry

public void setCountry(String country)

setPostalCode

public void setPostalCode(String postalCode)

setProvince

public void setProvince(String province)

equals

public boolean equals(Object o)
Overridden equals method for object comparison. Compares based on hashCode.

Specified by:
equals in class BaseObject
Parameters:
o - Object to compare
Returns:
true/false based on hashCode

hashCode

public int hashCode()
Overridden hashCode method - compares on address, city, province, country and postal code.

Specified by:
hashCode in class BaseObject
Returns:
hashCode

toString

public String toString()
Returns a multi-line String with key=value pairs.

Specified by:
toString in class BaseObject
Returns:
a String representation of this class.


Copyright © 2012. All Rights Reserved.