Package com.maxmind.geoip2.record
Class Subdivision
- java.lang.Object
-
- com.maxmind.geoip2.record.AbstractRecord
-
- com.maxmind.geoip2.record.AbstractNamedRecord
-
- com.maxmind.geoip2.record.Subdivision
-
public final class Subdivision extends AbstractNamedRecord
Contains data for the subdivisions associated with an IP address.
This record is returned by all the end points except the Country end point.
Do not use any of the subdivision names as a database or map key. Use the value returned by
AbstractNamedRecord.getGeoNameId()
orgetIsoCode()
instead.
-
-
Constructor Summary
Constructors Constructor Description Subdivision()
Subdivision(Subdivision subdivision, List<String> locales)
Subdivision(List<String> locales, Integer confidence, Integer geoNameId, String isoCode, Map<String,String> names)
Subdivision(List<String> locales, Integer confidence, Long geoNameId, String isoCode, Map<String,String> names)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getConfidence()
String
getIsoCode()
-
Methods inherited from class com.maxmind.geoip2.record.AbstractNamedRecord
getGeoNameId, getName, getNames
-
Methods inherited from class com.maxmind.geoip2.record.AbstractRecord
toJson, toString
-
-
-
-
Constructor Detail
-
Subdivision
public Subdivision()
-
Subdivision
public Subdivision(List<String> locales, Integer confidence, Integer geoNameId, String isoCode, Map<String,String> names)
-
Subdivision
public Subdivision(List<String> locales, Integer confidence, Long geoNameId, String isoCode, Map<String,String> names)
-
Subdivision
public Subdivision(Subdivision subdivision, List<String> locales)
-
-
Method Detail
-
getConfidence
public Integer getConfidence()
- Returns:
- This is a value from 0-100 indicating MaxMind's confidence that the subdivision is correct. This attribute is only available from the Insights end point and the GeoIP2 Enterprise database.
-
getIsoCode
public String getIsoCode()
- Returns:
- This is a string up to three characters long contain the subdivision portion of the ISO 3166-2code. This attribute is returned by all end points except Country.
-
-