IT. Expert System.

Android Reference

Address


android.location

Class Address

  • All Implemented Interfaces:
    Parcelable


    public class Address
    extends Object
    implements Parcelable
    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
    • Constructor Summary

      Constructors
      Constructor and Description
      Address(Locale locale)
      Constructs a new Address object set to the given Locale and with all other fields initialized to null or false.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      void clearLatitude()
      Removes any latitude associated with this address.
      void clearLongitude()
      Removes any longitude associated with this address.
      int describeContents()
      Describe the kinds of special objects contained in this Parcelable's marshalled representation.
      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 getAdminArea()
      Returns the administrative area name of the address, for example, "CA", or null if it is unknown
      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.
      String getFeatureName()
      Returns the feature name of the address, for example, "Golden Gate Bridge", or null if it is unknown
      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 "Mountain View", 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 getPremises()
      Returns the premises of the address, or null if it is unknown.
      String getSubAdminArea()
      Returns the sub-administrative area name of the address, for example, "Santa Clara County", or null if it is unknown
      String getSubLocality()
      Returns the sub-locality of the address, or null if it is unknown.
      String getSubThoroughfare()
      Returns the sub-thoroughfare name of the address, which may be null.
      String getThoroughfare()
      Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway", which may be null
      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 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 setAdminArea(String adminArea)
      Sets the administrative area name of the address 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 setFeatureName(String featureName)
      Sets the feature name of the address to the given String, which may be null
      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 setPremises(String premises)
      Sets the premises of the address to the given String, which may be null.
      void setSubAdminArea(String subAdminArea)
      Sets the sub-administrative area name of the address to the given String, which may be null
      void setSubLocality(String sublocality)
      Sets the sub-locality of the address to the given String, which may be null.
      void setSubThoroughfare(String subthoroughfare)
      Sets the sub-thoroughfare name of the address, which may be null.
      void setThoroughfare(String thoroughfare)
      Sets the thoroughfare name of the address, which may be null.
      void setUrl(String Url)
      Sets the public URL associated with this address.
      String toString()
      Returns a string containing a concise, human-readable description of this object.
      void writeToParcel(Parcel parcel, int flags)
      Flatten this object in to a Parcel.
    • Constructor Detail

      • Address

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

      • getLocale

        public Locale getLocale()
        Returns the Locale associated with this address.
      • getMaxAddressLineIndex

        public int getMaxAddressLineIndex()
        Returns the largest index currently in use to specify an address line. If no address lines are specified, -1 is returned.
      • getAddressLine

        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
      • setAddressLine

        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
      • getFeatureName

        public String getFeatureName()
        Returns the feature name of the address, for example, "Golden Gate Bridge", or null if it is unknown
      • setFeatureName

        public void setFeatureName(String featureName)
        Sets the feature name of the address to the given String, which may be null
      • getAdminArea

        public String getAdminArea()
        Returns the administrative area name of the address, for example, "CA", or null if it is unknown
      • setAdminArea

        public void setAdminArea(String adminArea)
        Sets the administrative area name of the address to the given String, which may be null
      • getSubAdminArea

        public String getSubAdminArea()
        Returns the sub-administrative area name of the address, for example, "Santa Clara County", or null if it is unknown
      • setSubAdminArea

        public void setSubAdminArea(String subAdminArea)
        Sets the sub-administrative area name of the address to the given String, which may be null
      • getLocality

        public String getLocality()
        Returns the locality of the address, for example "Mountain View", or null if it is unknown.
      • setLocality

        public void setLocality(String locality)
        Sets the locality of the address to the given String, which may be null.
      • getSubLocality

        public String getSubLocality()
        Returns the sub-locality of the address, or null if it is unknown. For example, this may correspond to the neighborhood of the locality.
      • setSubLocality

        public void setSubLocality(String sublocality)
        Sets the sub-locality of the address to the given String, which may be null.
      • getThoroughfare

        public String getThoroughfare()
        Returns the thoroughfare name of the address, for example, "1600 Ampitheater Parkway", which may be null
      • setThoroughfare

        public void setThoroughfare(String thoroughfare)
        Sets the thoroughfare name of the address, which may be null.
      • getSubThoroughfare

        public String getSubThoroughfare()
        Returns the sub-thoroughfare name of the address, which may be null. This may correspond to the street number of the address.
      • setSubThoroughfare

        public void setSubThoroughfare(String subthoroughfare)
        Sets the sub-thoroughfare name of the address, which may be null.
      • getPremises

        public String getPremises()
        Returns the premises of the address, or null if it is unknown.
      • setPremises

        public void setPremises(String premises)
        Sets the premises of the address to the given String, which may be null.
      • getPostalCode

        public String getPostalCode()
        Returns the postal code of the address, for example "94110", or null if it is unknown.
      • setPostalCode

        public void setPostalCode(String postalCode)
        Sets the postal code of the address to the given String, which may be null.
      • getCountryCode

        public String getCountryCode()
        Returns the country code of the address, for example "US", or null if it is unknown.
      • setCountryCode

        public void setCountryCode(String countryCode)
        Sets the country code of the address to the given String, which may be null.
      • getCountryName

        public String getCountryName()
        Returns the localized country name of the address, for example "Iceland", or null if it is unknown.
      • setCountryName

        public void setCountryName(String countryName)
        Sets the country name of the address to the given String, which may be null.
      • hasLatitude

        public boolean hasLatitude()
        Returns true if a latitude has been assigned to this Address, false otherwise.
      • getLatitude

        public double getLatitude()
        Returns the latitude of the address if known.
        Throws:
        IllegalStateException - if this Address has not been assigned a latitude.
      • setLatitude

        public void setLatitude(double latitude)
        Sets the latitude associated with this address.
      • clearLatitude

        public void clearLatitude()
        Removes any latitude associated with this address.
      • hasLongitude

        public boolean hasLongitude()
        Returns true if a longitude has been assigned to this Address, false otherwise.
      • getLongitude

        public double getLongitude()
        Returns the longitude of the address if known.
        Throws:
        IllegalStateException - if this Address has not been assigned a longitude.
      • setLongitude

        public void setLongitude(double longitude)
        Sets the longitude associated with this address.
      • clearLongitude

        public void clearLongitude()
        Removes any longitude associated with this address.
      • getPhone

        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.
      • setPhone

        public void setPhone(String phone)
        Sets the phone number associated with this address.
      • getUrl

        public String getUrl()
        Returns the public URL for the address if known, or null if it is unknown.
      • setUrl

        public void setUrl(String Url)
        Sets the public URL associated with this address.
      • getExtras

        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.
      • setExtras

        public void setExtras(Bundle extras)
        Sets the extra information associated with this fix to the given Bundle.
      • toString

        public String toString()
        Description copied from class: Object
        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 is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 179 / 158848591. Delta: 0.03805 с