Country¶
-
public class
Countryextends Place¶ A
Countryis a specific kind ofPlacethat 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
nameexist, 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
Methods¶
getFullName¶
-
public String
getFullName()¶ Get name of country, which is suitable for display in UI.
Returns: Name of country, abbreviated if necessary to have a maximum length of org.codethechange.culturemesh.Listable.MAX_CHARS.See also:
org.codethechange.culturemesh.Listable