java.lang.Object
com.maxmind.geoip2.record.AbstractRecord
com.maxmind.geoip2.record.AbstractNamedRecord
com.maxmind.geoip2.record.Country
com.maxmind.geoip2.record.RepresentedCountry
Contains data for the represented country associated with an IP address.
This class contains the country-level data associated with an IP address for the IP's represented country. The represented country is the country represented by something like a military base.
Do not use any of the country names as a database or map key. Use the value
returned by AbstractNamedRecord.getGeoNameId()
or Country.getIsoCode()
instead.
-
Constructor Summary
ConstructorDescriptionConstructs an instance ofRepresentedCountry
with no data.RepresentedCountry
(RepresentedCountry country, List<String> locales) Constructs an instance ofRepresentedCountry
.RepresentedCountry
(List<String> locales, Integer confidence, Long geoNameId, Boolean isInEuropeanUnion, String isoCode, Map<String, String> names, String type) Constructs an instance ofRepresentedCountry
. -
Method Summary
Methods inherited from class com.maxmind.geoip2.record.Country
getConfidence, getIsoCode, isInEuropeanUnion
Methods inherited from class com.maxmind.geoip2.record.AbstractNamedRecord
getGeoNameId, getName, getNames
Methods inherited from class com.maxmind.geoip2.record.AbstractRecord
toJson, toString
-
Constructor Details
-
RepresentedCountry
public RepresentedCountry()Constructs an instance ofRepresentedCountry
with no data. -
RepresentedCountry
public RepresentedCountry(List<String> locales, Integer confidence, Long geoNameId, Boolean isInEuropeanUnion, String isoCode, Map<String, String> names, String type) Constructs an instance ofRepresentedCountry
.- Parameters:
locales
- The locales to use.confidence
- This is a value from 0-100 indicating MaxMind's confidence that the country is correct.geoNameId
- This is a GeoName ID for the country.isInEuropeanUnion
- This is true if the country is a member state of the European Union.isoCode
- This is a string up to three characters long contain the country code.names
- This is a map from locale codes to the names for the country in that locale.type
- This is a string indicating the type of entity that is representing the country.
-
RepresentedCountry
Constructs an instance ofRepresentedCountry
.- Parameters:
country
- TheRepresentedCountry
object to copy.locales
- The locales to use.
-
-
Method Details
-
getType
- Returns:
- A string indicating the type of entity that is representing the
country. Currently, we only return
military
but this could expand to include other types in the future.
-