java.lang.Object | |
↳ | android.location.Address |
A class representing an Address, i.e, a set of Strings describing a location. The addres format is a simplified version of xAL (eXtensible Address Language) http://www.oasis-open.org/committees/ciq/ciq.html#6
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creator<Address> | CREATOR |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Address object set to the given Locale and with all
other fields initialized to null or false.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes any latitude associated with this address.
| |||||||||||
Removes any longitude associated with this address.
| |||||||||||
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
| |||||||||||
Returns a line of the address numbered by the given index
(starting at 0), or null if no such line is present.
| |||||||||||
Returns the administrative area name of the address, for example, "CA", or null if
it is unknown
| |||||||||||
Returns the country code of the address, for example "US",
or null if it is unknown.
| |||||||||||
Returns the localized country name of the address, for example "Iceland",
or null if it is unknown.
| |||||||||||
Returns additional provider-specific information about the
address as a Bundle.
| |||||||||||
Returns the feature name of the address, for example, "Golden Gate Bridge", or null
if it is unknown
| |||||||||||
Returns the latitude of the address if known.
| |||||||||||
Returns the Locale associated with this address.
| |||||||||||
Returns the locality of the address, for example "Mountain View", or null if it is unknown.
| |||||||||||
Returns the longitude of the address if known.
| |||||||||||
Returns the largest index currently in use to specify an address line.
| |||||||||||
Returns the phone number of the address if known,
or null if it is unknown.
| |||||||||||
Returns the postal code of the address, for example "94110",
or null if it is unknown.
| |||||||||||
Returns the sub-administrative area name of the address, for example, "Santa Clara County",
or null if it is unknown
| |||||||||||
Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway",
which may be null
| |||||||||||
Returns the public URL for the address if known,
or null if it is unknown.
| |||||||||||
Returns true if a latitude has been assigned to this Address,
false otherwise.
| |||||||||||
Returns true if a longitude has been assigned to this Address,
false otherwise.
| |||||||||||
Sets the line of the address numbered by index (starting at 0) to the
given String, which may be null.
| |||||||||||
Sets the administrative area name of the address to the given String, which may be null
| |||||||||||
Sets the country code of the address to the given String, which may
be null.
| |||||||||||
Sets the country name of the address to the given String, which may
be null.
| |||||||||||
Sets the extra information associated with this fix to the
given Bundle.
| |||||||||||
Sets the feature name of the address to the given String, which may be null
| |||||||||||
Sets the latitude associated with this address.
| |||||||||||
Sets the locality of the address to the given String, which may be null.
| |||||||||||
Sets the longitude associated with this address.
| |||||||||||
Sets the phone number associated with this address.
| |||||||||||
Sets the postal code of the address to the given String, which may
be null.
| |||||||||||
Sets the sub-administrative area name of the address to the given String, which may be null
| |||||||||||
Sets the thoroughfare name of the address, which may be null.
| |||||||||||
Sets the public URL associated with this address.
| |||||||||||
Returns a string containing a concise, human-readable description of this
object.
| |||||||||||
Flatten this object in to a Parcel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface android.os.Parcelable
|
Constructs a new Address object set to the given Locale and with all other fields initialized to null or false.
Removes any latitude associated with this address.
Removes any longitude associated with this address.
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
Returns a line of the address numbered by the given index (starting at 0), or null if no such line is present.
IllegalArgumentException | if index < 0 |
---|
Returns the administrative area name of the address, for example, "CA", or null if it is unknown
Returns the country code of the address, for example "US", or null if it is unknown.
Returns the localized country name of the address, for example "Iceland", or null if it is unknown.
Returns additional provider-specific information about the address as a Bundle. The keys and values are determined by the provider. If no additional information is available, null is returned.
Returns the feature name of the address, for example, "Golden Gate Bridge", or null if it is unknown
Returns the latitude of the address if known.
IllegalStateException | if this Address has not been assigned a latitude. |
---|
Returns the Locale associated with this address.
Returns the locality of the address, for example "Mountain View", or null if it is unknown.
Returns the longitude of the address if known.
IllegalStateException | if this Address has not been assigned a longitude. |
---|
Returns the largest index currently in use to specify an address line. If no address lines are specified, -1 is returned.
Returns the phone number of the address if known, or null if it is unknown.
IllegalStateException | if this Address has not been assigned a latitude. |
---|
Returns the postal code of the address, for example "94110", or null if it is unknown.
Returns the sub-administrative area name of the address, for example, "Santa Clara County", or null if it is unknown
Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway", which may be null
Returns the public URL for the address if known, or null if it is unknown.
Returns true if a latitude has been assigned to this Address, false otherwise.
Returns true if a longitude has been assigned to this Address, false otherwise.
Sets the line of the address numbered by index (starting at 0) to the given String, which may be null.
IllegalArgumentException | if index < 0 |
---|
Sets the administrative area name of the address to the given String, which may be null
Sets the country code of the address to the given String, which may be null.
Sets the country name of the address to the given String, which may be null.
Sets the extra information associated with this fix to the given Bundle.
Sets the feature name of the address to the given String, which may be null
Sets the latitude associated with this address.
Sets the locality of the address to the given String, which may be null.
Sets the longitude associated with this address.
Sets the phone number associated with this address.
Sets the postal code of the address to the given String, which may be null.
Sets the sub-administrative area name of the address to the given String, which may be null
Sets the thoroughfare name of the address, which may be null.
Sets the public URL associated with this address.
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's hashCode(), that is, it is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Flatten this object in to a Parcel.
parcel | The Parcel in which the object should be written. |
---|---|
flags | Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. |