HERE Android SDK Developer's Guide

City

The class City is a member of com.here.android.mpa.urbanmobility .

Class Summary

public class City

extends java.lang.Object

Represents a city with the associated city coverage information.

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in City
Methods

public boolean equals (Object o)

public String getCountry ()

Gets the name of the country that the city belongs to.

public Date getCreated ()

Gets the date that the city information was created.

public String getDisplayName ()

Gets hint of how name, state and country could be displayed in screen.

public int getDistance ()

Gets distance to be used when user coordinates are known.

public GeoCoordinate getLocation ()

Gets geo coordinates of the city.

public MissingCoverage getMissingCoverage ()

Gets information about missing operators, lines or timetables.

public String getName ()

Gets name of the city.

public java.util.Collection <Operator> getOperators ()

Gets operators serving city.

public int getPopulation ()

Gets the city population.

public java.util.Collection <Provider> getProviders ()

Gets coverage data providers.

public float getQuality ()

Gets the percentage of the city coverage in between 0.0 (nothing covered) and 1.0 (completely covered).

public double getRelevancy ()

Gets city relevancy as a weight value [0..1], that reflects how relevant this city should be for user when user is in some specific location.

public String getState ()

Gets name of the state that the city belongs to.

public int getStopsCount ()

Gets the number of stops found in this city.

public int getTransportsCount ()

Gets the number of transports found.

public Date getUpdated ()

Gets the date the city information was updated.

public int hashCode ()

Class Details

Represents a city with the associated city coverage information.

IMPORTANT: Urban Mobility Coverage Search is a Beta feature. The related classes are subject to change without notice.

Method Details

public boolean equals (Object o)

Parameters:

  • o

public String getCountry ()

Gets the name of the country that the city belongs to. Country name is localized according to Locale.getDefault(). If given language is not supported English version is returned.

Returns:

Name of the country.

public Date getCreated ()

Gets the date that the city information was created.

Returns:

The date the city information was created.

public String getDisplayName ()

Gets hint of how name, state and country could be displayed in screen. There is no guarantee that this hint must be correct. Display name is localized according to Locale.getDefault(). If given language is not supported English version is returned.

Returns:

Display name string or empty string.

public int getDistance ()

Gets distance to be used when user coordinates are known.

Returns:

Distance in meters, or -1 if not available.

public GeoCoordinate getLocation ()

Gets geo coordinates of the city.

Returns:

Geo coordinates of the city.

public MissingCoverage getMissingCoverage ()

Gets information about missing operators, lines or timetables.

Returns:

Information about missing operators, lines or timetables, or null if not available.

public String getName ()

Gets name of the city. Name is localized according to Locale.getDefault(). If given language is not supported English version is returned.

Returns:

Name of the city.

public java.util.Collection <Operator> getOperators ()

Gets operators serving city.

Returns:

Collection of operators serving city.

public int getPopulation ()

Gets the city population.

Returns:

City population, or -1 if not available.

public java.util.Collection <Provider> getProviders ()

Gets coverage data providers.

Returns:

Collection of data providers.

public float getQuality ()

Gets the percentage of the city coverage in between 0.0 (nothing covered) and 1.0 (completely covered).

Returns:

City coverage quality from 0.0 to 1.0, or -1.0 if not available.

public double getRelevancy ()

Gets city relevancy as a weight value [0..1], that reflects how relevant this city should be for user when user is in some specific location. This will mostly give correct results but it cannot be guaranteed.

Returns:

City relevancy 0..1, or -1.0 if not available.

public String getState ()

Gets name of the state that the city belongs to.

Returns:

Name of the state that the city belongs to, or empty string if not available.

public int getStopsCount ()

Gets the number of stops found in this city.

Returns:

Number of stops found, or -1 if not available.

public int getTransportsCount ()

Gets the number of transports found.

Returns:

Number of transports found, or -1 if not available.

public Date getUpdated ()

Gets the date the city information was updated.

Returns:

The date the city information was updated.

public int hashCode ()