public class Address
extends java.lang.Object
Location
. The information is divided among
fields such as country, street, etc.Constructor and Description |
---|
Address()
Default constructor.
|
Address(Address other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalData(java.lang.String key,
java.lang.String value)
Adds additional address data, one key-value pair per call.
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalData()
Gets additional address data.
|
java.lang.String |
getCity()
Gets the current city name for the
Address . |
java.lang.String |
getCountryCode()
Gets the current ISO 3166-1 (3-letter) country code for the
Address . |
java.lang.String |
getCountryName()
Gets the current country name for the
Address . |
java.lang.String |
getCounty()
Gets the current county name for the
Address . |
java.lang.String |
getDistrict()
Gets the current district name for the
Address . |
java.lang.String |
getFloorNumber()
Gets the current floor number (in a multi-story building) for the
Address . |
java.lang.String |
getHouseNumber()
Gets the current house number for the
Address . |
java.lang.String |
getPostalCode()
Gets the current postal code for the
Address . |
java.lang.String |
getState()
Gets the current state name for the
Address . |
java.lang.String |
getStateCode()
Gets the current state code (state abbreviation) for the
Address . |
java.lang.String |
getStreet()
Gets the current street name for the
Address . |
java.lang.String |
getSuiteNumberOrName()
Gets the current suite number or suite name for the
Address . |
java.lang.String |
getText()
Gets the current text for the
Address . |
int |
hashCode() |
Address |
setCity(java.lang.String city)
Sets a city name for the
Address . |
Address |
setCountryCode(java.lang.String countryCode)
Sets an ISO 3166-1 (3-letter) country code for the
Address . |
Address |
setCountryName(java.lang.String countryName)
Sets a country name for the
Address . |
Address |
setCounty(java.lang.String county)
Sets a county name for the
Address . |
Address |
setDistrict(java.lang.String district)
Sets a district name for the
Address . |
Address |
setFloorNumber(java.lang.String floorNumber)
Sets a floor number (in a multi-story building) for the
Address . |
Address |
setHouseNumber(java.lang.String houseNumber)
Sets a house number for the
Address . |
Address |
setPostalCode(java.lang.String postalCode)
Sets a postal code for the
Address . |
Address |
setState(java.lang.String state)
Sets a state name for the
Address . |
Address |
setStateCode(java.lang.String state)
Sets a state code (abbreviation) for the
Address . |
Address |
setStreet(java.lang.String street)
Sets a street name for the
Address . |
Address |
setSuiteNumberOrName(java.lang.String suiteNumberOrName)
Sets a suite number or suite name for the
Address . |
Address |
setText(java.lang.String text)
Sets text for the
Address . |
java.lang.String |
toString() |
public Address()
public Address(Address other)
other
- The other Address
to copy.public Address setCity(java.lang.String city)
Address
.city
- Desired city nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getCity()
Address
.empty
)public Address setCountryCode(java.lang.String countryCode)
Address
.countryCode
- Desired ISO 3166-1 country codeAddress
object.java.lang.NullPointerException
- If the argument is null.java.lang.IllegalArgumentException
- If the country code is not a three-letter string.public java.lang.String getCountryCode()
Address
.empty
)public Address setCountryName(java.lang.String countryName)
Address
.countryName
- Desired country nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getCountryName()
Address
.empty
)public Address setCounty(java.lang.String county)
Address
.county
- Desired county nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getCounty()
Address
.empty
)public Address setDistrict(java.lang.String district)
Address
.district
- Desired district nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getDistrict()
Address
.empty
)public Address setFloorNumber(java.lang.String floorNumber)
Address
.floorNumber
- Desired floor numberAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getFloorNumber()
Address
.empty
)public Address setHouseNumber(java.lang.String houseNumber)
Address
.houseNumber
- Desired house numberAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getHouseNumber()
Address
.empty
)public Address setPostalCode(java.lang.String postalCode)
Address
.postalCode
- Desired postal codeAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getPostalCode()
Address
.empty
)public Address setState(java.lang.String state)
Address
.state
- Desired state nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getState()
Address
.empty
)public Address setStateCode(java.lang.String state)
Address
.state
- Desired state name or abbreviationAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getStateCode()
Address
.empty
)public Address setStreet(java.lang.String street)
Address
.street
- Desired street nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getStreet()
Address
.empty
)public Address setSuiteNumberOrName(java.lang.String suiteNumberOrName)
Address
.suiteNumberOrName
- Desired suite number or nameAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getSuiteNumberOrName()
Address
.empty
)public Address setText(java.lang.String text)
Address
.text
- Desired text for the addressAddress
object.java.lang.NullPointerException
- If the argument is null.public java.lang.String getText()
Address
.empty
)public java.util.Map<java.lang.String,java.lang.String> getAdditionalData()
java.util.Map
of the additional data in key-value notation.public void addAdditionalData(java.lang.String key, java.lang.String value)
key
- The key for additional data (key-value pair).value
- The value for additional data (key-value pair).public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object