Class Address

  • java.lang.Object
    • com.here.sdk.search.Address

  • public final class Address
    extends java.lang.Object

    Information about the address of a location.

    Used in Place.getAddress().

    Note that while OfflineSearchEngine.suggest and OfflineSearchEngine.suggestByText set all available details, SearchEngine.suggest and SearchEngine.suggestByText set only addressText. Complete address details can be obtained by searching with PlaceIdQuery.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String addressText
      The text for the address, for example, "Secret Garden, 347 Lewis Ave, Brooklyn, NY 11233, United States".
      java.lang.String block
      The block number for the address.
      java.lang.String city
      The city name for the address, for example, "Brooklyn".
      java.lang.String country
      The country name for the address, for example, "United States".
      java.lang.String countryCode
      An ISO-3166-1 (3-letter) country code for the address, for example, "USA".
      java.lang.String county
      The county name for the address.
      java.lang.String district
      The district name for the address.
      java.lang.String houseNumOrName
      The house name or number for the address, for example, "347".
      java.lang.String postalCode
      The postal code for the address.
      java.lang.String state
      The state name for the address.
      java.lang.String stateCode
      The state code for the address.
      java.lang.String street
      The street name for the address, for example, "Lewis Ave".
      java.lang.String subBlock
      The sub-block number for the address.
      java.lang.String subdistrict
      The subdistrict name for the address.
      AddressType type
      Specifies the address type.
    • Constructor Summary

      Constructors 
      Constructor Description
      Address()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • city

        @NonNull
        public java.lang.String city

        The city name for the address, for example, "Brooklyn". Note: This String can be empty when no data is available.

      • countryCode

        @NonNull
        public java.lang.String countryCode

        An ISO-3166-1 (3-letter) country code for the address, for example, "USA". Note: This String can be empty when no data is available.

      • country

        @NonNull
        public java.lang.String country

        The country name for the address, for example, "United States". Note: This String can be empty when no data is available.

      • district

        @NonNull
        public java.lang.String district

        The district name for the address. It is a division of city, typically an administrative unit within a larger city or a customary name of a city's neighborhood, for example, "Bedford-Stuyvesant". Note: This String can be empty when no data is available.

      • subdistrict

        @NonNull
        public java.lang.String subdistrict

        The subdistrict name for the address. It is a subdivision of a district. Note: This String can be empty when no data is available.

      • houseNumOrName

        @NonNull
        public java.lang.String houseNumOrName

        The house name or number for the address, for example, "347". Note: This String can be empty when no data is available.

      • postalCode

        @NonNull
        public java.lang.String postalCode

        The postal code for the address. It is an alphanumeric string included in a postal address to facilitate mail sorting, known locally in various countries throughout the world as a postcode, post code, PIN or ZIP Code, for example, "11233". Note: This String can be empty when no data is available.

      • state

        @NonNull
        public java.lang.String state

        The state name for the address. It is the name of the state division of a country, for example, "New York". Note: This String can be empty when no data is available.

      • county

        @NonNull
        public java.lang.String county

        The county name for the address. It is a division of a state, typically a secondary-level administrative division of a country or equivalent, for example, "Kings". Note: This String can be empty when no data is available.

      • street

        @NonNull
        public java.lang.String street

        The street name for the address, for example, "Lewis Ave". Note: This String can be empty when no data is available.

      • block

        @NonNull
        public java.lang.String block

        The block number for the address. It is part of Japanese addressing system. Note: This String can be empty when no data is available.

      • subBlock

        @NonNull
        public java.lang.String subBlock

        The sub-block number for the address. It is part of Japanese addressing system. Note: This String can be empty when no data is available.

      • addressText

        @NonNull
        public java.lang.String addressText

        The text for the address, for example, "Secret Garden, 347 Lewis Ave, Brooklyn, NY 11233, United States". Note: This String can be empty when no data is available.

      • type

        @Nullable
        public AddressType type

        Specifies the address type.

      • stateCode

        @NonNull
        public java.lang.String stateCode

        The state code for the address. It is code/abbreviation of the state division of a country, for example, "NY". Note: This String can be empty when no data is available.

    • Constructor Detail

      • Address

        public Address()

        Default constructor. Note: Sets all the string values to "".

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object