Country¶
-
public class
Country
extends Place¶ A
Country
is a specific kind ofPlace
that stores the ID and name of a country. No instance field should ever be set toPlace.NOWHERE
.
Fields¶
Constructors¶
Country¶
-
public
Country
(long id, String name, Point latLng, long population, String featureCode, String isoA2)¶ Initialize instance fields and those of superclass with provided parameters
Parameters: - id – ID of country
- name – Name of country
- latLng – Latitude and longitude coordinates of the region
- population – Population of the region
- featureCode – Region’s feature code
- isoA2 – 2-Letter ISO country code
Country¶
-
public
Country
(JSONObject json)¶ Initialize instance fields and those of superclass based on provided JSON It requires that the key
name
exist, as its value will be used as the country’s nameParameters: - json – JSON object describing the country to create
Throws: - JSONException – May be thrown in response to invalid JSON object