HERE Android SDK Developer's Guide

Address

The class Address is a member of com.here.android.mpa.search .

Class Summary

public class Address

extends java.lang.Object

Provides textual address information for a Location.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in Address
Constructors

Address ()

Default constructor.

Address (Address other)

Copy constructor.

Method Summary

Table 2. Methods in Address
Methods

public void addAdditionalData (String key, String value)

Adds additional address data, one key-value pair per call.

public boolean equals (Object obj)

For documentation, see java.lang.Object

public Map getAdditionalData ()

Gets additional address data.

public String getCity ()

Gets the current city name for the Address .

public String getCountryCode ()

Gets the current ISO 3166-1 (3-letter) country code for the Address .

public String getCountryName ()

Gets the current country name for the Address .

public String getCounty ()

Gets the current county name for the Address .

public String getDistrict ()

Gets the current district name for the Address .

public String getFloorNumber ()

Gets the current floor number (in a multi-story building) for the Address .

public String getHouseNumber ()

Gets the current house number for the Address .

public String getPostalCode ()

Gets the current postal code for the Address .

public String getState ()

Gets the current state name for the Address .

public String getStateCode ()

Gets the current state code (state abbreviation) for the Address .

public String getStreet ()

Gets the current street name for the Address .

public String getSuiteNumberOrName ()

Gets the current suite number or suite name for the Address .

public String getText ()

Gets a displayable, formatted rich text for the entire Address .

public int hashCode ()

For documentation, see java.lang.Object

public Address setCity (String city)

Sets a city name for the Address .

public Address setCountryCode (String countryCode)

Sets an ISO 3166-1 (3-letter) country code for the Address .

public Address setCountryName (String countryName)

Sets a country name for the Address .

public Address setCounty (String county)

Sets a county name for the Address .

public Address setDistrict (String district)

Sets a district name for the Address .

public Address setFloorNumber (String floorNumber)

Sets a floor number (in a multi-story building) for the Address .

public Address setHouseNumber (String houseNumber)

Sets a house number for the Address .

public Address setPostalCode (String postalCode)

Sets a postal code for the Address .

public Address setState (String state)

Sets a state name for the Address .

public Address setStateCode (String state)

Sets a state code (abbreviation) for the Address .

public Address setStreet (String street)

Sets a street name for the Address .

public Address setSuiteNumberOrName (String suiteNumberOrName)

Sets a suite number or suite name for the Address .

public Address setText (String text)

Sets text for the Address .

public String toString ()

For documentation, see java.lang.Object

Class Details

Provides textual address information for a Location. The information is divided among fields such as country, street, postal code, and so on.

To retrieve a combined, formatted string of this address, use the getText() method.

Constructor Details

Address ()

Default constructor.

Address (Address other)

Copy constructor.

Parameters:

  • other

    The other Address to copy.

Method Details

public void addAdditionalData (String key, String value)

Adds additional address data, one key-value pair per call.

Parameters:

  • key

    The key for additional data (key-value pair).

  • value

    The value for additional data (key-value pair).

public boolean equals (Object obj)

For documentation, see java.lang.Object

Parameters:

  • obj

public Map getAdditionalData ()

Gets additional address data.

Returns:

The java.util.Map of the additional data in key-value notation.

public String getCity ()

Gets the current city name for the Address .

Returns:

The current city name (could be empty)

public String getCountryCode ()

Gets the current ISO 3166-1 (3-letter) country code for the Address .

Returns:

The current country code (could be empty)

public String getCountryName ()

Gets the current country name for the Address .

Returns:

The current country name (could be empty)

public String getCounty ()

Gets the current county name for the Address .

Returns:

The current county name (could be empty)

public String getDistrict ()

Gets the current district name for the Address .

Returns:

The current district name (could be empty)

public String getFloorNumber ()

Gets the current floor number (in a multi-story building) for the Address .

Returns:

The current floor number (could be empty)

public String getHouseNumber ()

Gets the current house number for the Address .

Returns:

The current house number (could be empty)

public String getPostalCode ()

Gets the current postal code for the Address .

Returns:

The current postal code (could be empty)

public String getState ()

Gets the current state name for the Address .

Returns:

The current state name or abbreviation (could be empty)

public String getStateCode ()

Gets the current state code (state abbreviation) for the Address .

Returns:

The current state name or abbreviation (could be empty)

public String getStreet ()

Gets the current street name for the Address .

Returns:

The current street name (could be empty)

public String getSuiteNumberOrName ()

Gets the current suite number or suite name for the Address .

Returns:

The current suite number or name (could be empty)

public String getText ()

Gets a displayable, formatted rich text for the entire Address . For example, "22 Rue du Grenier Saint-Lazare\n75003 Paris\nFrance"

Returns:

The current text (could be empty)

public int hashCode ()

For documentation, see java.lang.Object

public Address setCity (String city)

Sets a city name for the Address .

Parameters:

  • city

    Desired city name

Throws:

  • NullPointerException

    Passed argument is null

public Address setCountryCode (String countryCode)

Sets an ISO 3166-1 (3-letter) country code for the Address .

Parameters:

  • countryCode

    Desired ISO 3166-1 country code

Throws:

  • NullPointerException

    Passed argument is null

  • IllegalArgumentException

    Country code is not 3-letters

public Address setCountryName (String countryName)

Sets a country name for the Address .

Parameters:

  • countryName

    Desired country name

Throws:

  • NullPointerException

    Passed argument is null

public Address setCounty (String county)

Sets a county name for the Address .

Parameters:

  • county

    Desired county name

Throws:

  • NullPointerException

    Passed argument is null

public Address setDistrict (String district)

Sets a district name for the Address .

Parameters:

  • district

    Desired district name

Throws:

  • NullPointerException

    Passed argument is null

public Address setFloorNumber (String floorNumber)

Sets a floor number (in a multi-story building) for the Address .

Parameters:

  • floorNumber

    Desired floor number

Throws:

  • NullPointerException

    Passed argument is null

public Address setHouseNumber (String houseNumber)

Sets a house number for the Address .

Parameters:

  • houseNumber

    Desired house number

Throws:

  • NullPointerException

    Passed argument is null

public Address setPostalCode (String postalCode)

Sets a postal code for the Address .

Parameters:

  • postalCode

    Desired postal code

Throws:

  • NullPointerException

    Passed argument is null

public Address setState (String state)

Sets a state name for the Address .

Parameters:

  • state

    Desired state name

Throws:

  • NullPointerException

    Passed argument is null

public Address setStateCode (String state)

Sets a state code (abbreviation) for the Address .

Parameters:

  • state

    Desired state name or abbreviation

Throws:

  • NullPointerException

    Passed argument is null

public Address setStreet (String street)

Sets a street name for the Address .

Parameters:

  • street

    Desired street name

Throws:

  • NullPointerException

    Passed argument is null

public Address setSuiteNumberOrName (String suiteNumberOrName)

Sets a suite number or suite name for the Address .

Parameters:

  • suiteNumberOrName

    Desired suite number or name

Throws:

  • NullPointerException

    Passed argument is null

public Address setText (String text)

Sets text for the Address .

Parameters:

  • text

    Desired text for the address

Throws:

  • NullPointerException

    Passed argument is null

public String toString ()

For documentation, see java.lang.Object

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.