Interface NamedRecord
- All Superinterfaces:
JsonSerializable
- All Known Implementing Classes:
City, Continent, Country, RepresentedCountry, Subdivision
Interface for record classes that have localized names and GeoName IDs.
Provides a default implementation for the name() method that returns the name
in the first available locale.
-
Method Summary
Methods inherited from interface JsonSerializable
toJson
-
Method Details
-
geonameId
Long geonameId()- Returns:
- The GeoName ID for this location.
-
names
-
locales
-
name
- Returns:
- The name based on the locales list. Returns the name in the first locale for which a name is available. If no name is available in any of the specified locales, returns null.
-