Reference:Android.location.Address

From Triled Wiki

Jump to: navigation, search


android.location
public class android.location.Address

java.lang.Object
android.location.Address Parcelable

A class representing an Address, i.e, a set of Strings describing a location.

[edit] Summary

[edit] Constants

      Value  
Creator   CREATOR        

[edit] Public Constructors

          Address (Locale locale)
Constructs a new Address object set to the given Locale and with all other fields initialized to null or false.

[edit] Public Methods

        String   getAddressLine (int index)
Returns a line of the address numbered by the given index (starting at 0), or null if no such line is present.
        String   getCountryCode ()
Returns the country code of the address, for example "US", or null if it is unknown.
        String   getCountryName ()
Returns the localized country name of the address, for example "Iceland", or null if it is unknown.
        Bundle   getExtras ()
Returns additional provider-specific information about the address as a Bundle.
        double  getLatitude ()
Returns the latitude of the address if known.
        Locale   getLocale ()
Returns the Locale associated with this address.
        String   getLocality ()
Returns the locality of the address, for example "San Francisco", or null if it is unknown.
        double  getLongitude ()
Returns the longitude of the address if known.
        int  getMaxAddressLineIndex ()
Returns the largest index currently in use to specify an address line.
        String   getPhone ()
Returns the phone number of the address if known, or null if it is unknown.
        String   getPostalCode ()
Returns the postal code of the address, for example "94110", or null if it is unknown.
        String   getRegion ()
Returns the region of the address, for example "CA" (for California), or null if it is unknown.
        String   getUrl ()
Returns the public URL for the address if known, or null if it is unknown.
        boolean  hasLatitude ()
Returns true if a latitude has been assigned to this Address, false otherwise.
        boolean  hasLongitude ()
Returns true if a longitude has been assigned to this Address, false otherwise.
        void  mClearLatitude ()
Removes any latitude associated with this address.
        void  mClearLongitude ()
Removes any longitude associated with this address.
        void  setAddressLine (int index, String line)
Sets the line of the address numbered by index (starting at 0) to the given String, which may be null.
        void  setCountryCode (String countryCode)
Sets the country code of the address to the given String, which may be null.
        void  setCountryName (String countryName)
Sets the country name of the address to the given String, which may be null.
        void  setExtras (Bundle extras)
Sets the extra information associated with this fix to the given Bundle.
        void  setLatitude (double latitude)
Sets the latitude associated with this address.
        void  setLocality (String locality)
Sets the locality of the address to the given String, which may be null.
        void  setLongitude (double longitude)
Sets the longitude associated with this address.
        void  setPhone (String phone)
Sets the phone number associated with this address.
        void  setPostalCode (String postalCode)
Sets the postal code of the address to the given String, which may be null.
        void  setRegion (String region)
Sets the region of the address to the given String, which may be null.
        void  setUrl (String Url)
Sets the public URL associated with this address.
        String   toString ()
Answers a string containing a concise, human-readable description of the receiver.
        void  writeToParcel (Parcel parcel)

[edit] Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
[edit] Methods inherited from interface android.os.Parcelable

writeToParcel

[edit] Details

[edit] Constants

[edit] public static final Creator CREATOR

[edit] Public Constructors

[edit] public Address(Locale locale)

Constructs a new Address object set to the given Locale and with all other fields initialized to null or false.

[edit] Public Methods

[edit] public String getAddressLine(int index)

Returns a line of the address numbered by the given index (starting at 0), or null if no such line is present.

Throws

IllegalArgumentException if index < 0

[edit] public String getCountryCode()

Returns the country code of the address, for example "US", or null if it is unknown.

[edit] public String getCountryName()

Returns the localized country name of the address, for example "Iceland", or null if it is unknown.

[edit] public Bundle getExtras()

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.

[edit] public double getLatitude()

Returns the latitude of the address if known.

Throws

IllegalStateException if this Address has not been assigned a latitude.

[edit] public Locale getLocale()

Returns the Locale associated with this address.

[edit] public String getLocality()

Returns the locality of the address, for example "San Francisco", or null if it is unknown.

[edit] public double getLongitude()

Returns the longitude of the address if known.

Throws

IllegalStateException if this Address has not been assigned a longitude.

[edit] public int getMaxAddressLineIndex()

Returns the largest index currently in use to specify an address line. If no address lines are specified, -1 is returned.

[edit] public String getPhone()

Returns the phone number of the address if known, or null if it is unknown.

Throws

IllegalStateException if this Address has not been assigned a latitude.

[edit] public String getPostalCode()

Returns the postal code of the address, for example "94110", or null if it is unknown.

[edit] public String getRegion()

Returns the region of the address, for example "CA" (for California), or null if it is unknown.

[edit] public String getUrl()

Returns the public URL for the address if known, or null if it is unknown.

[edit] public boolean hasLatitude()

Returns true if a latitude has been assigned to this Address, false otherwise.

[edit] public boolean hasLongitude()

Returns true if a longitude has been assigned to this Address, false otherwise.

[edit] public void mClearLatitude()

Removes any latitude associated with this address.

[edit] public void mClearLongitude()

Removes any longitude associated with this address.

[edit] public void setAddressLine(int index, String line)

Sets the line of the address numbered by index (starting at 0) to the given String, which may be null.

Throws

IllegalArgumentException if index < 0

[edit] public void setCountryCode(String countryCode)

Sets the country code of the address to the given String, which may be null.

[edit] public void setCountryName(String countryName)

Sets the country name of the address to the given String, which may be null.

[edit] public void setExtras(Bundle extras)

Sets the extra information associated with this fix to the given Bundle.

[edit] public void setLatitude(double latitude)

Sets the latitude associated with this address.

[edit] public void setLocality(String locality)

Sets the locality of the address to the given String, which may be null.

[edit] public void setLongitude(double longitude)

Sets the longitude associated with this address.

[edit] public void setPhone(String phone)

Sets the phone number associated with this address.

[edit] public void setPostalCode(String postalCode)

Sets the postal code of the address to the given String, which may be null.

[edit] public void setRegion(String region)

Sets the region of the address to the given String, which may be null.

[edit] public void setUrl(String Url)

Sets the public URL associated with this address.

[edit] public String toString()

Answers a string containing a concise, human-readable description of the receiver.

[edit] public void writeToParcel(Parcel parcel)

[edit] References

Personal tools