java.lang.Object
com.maxmind.geoip2.record.AbstractRecord
com.maxmind.geoip2.record.AbstractNamedRecord
com.maxmind.geoip2.record.Subdivision
Contains data for the subdivisions associated with an IP address.
Do not use any of the subdivision names as a database or map key. Use the
value returned by AbstractNamedRecord.getGeoNameId()
or getIsoCode()
instead.
-
Constructor Summary
ConstructorDescriptionConstructs aSubdivision
record.Subdivision
(Subdivision subdivision, List<String> locales) Constructs an instance ofSubdivision
with the specified parameters.Subdivision
(List<String> locales, Integer confidence, Long geoNameId, String isoCode, Map<String, String> names) Constructs an instance ofSubdivision
. -
Method Summary
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
-
Subdivision
public Subdivision()Constructs aSubdivision
record. -
Subdivision
public Subdivision(List<String> locales, Integer confidence, Long geoNameId, String isoCode, Map<String, String> names) Constructs an instance ofSubdivision
.- Parameters:
locales
- The locales to use.confidence
- This is a value from 0-100 indicating MaxMind's confidence that the subdivision is correct.geoNameId
- This is a GeoName ID for the subdivision.isoCode
- This is a string up to three characters long contain the subdivision code.names
- This is a map from locale codes to the names for the subdivision in that locale.
-
Subdivision
Constructs an instance ofSubdivision
with the specified parameters.- Parameters:
subdivision
- TheSubdivision
object to copy.locales
- The locales to use.
-
-
Method Details
-
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 web service and the GeoIP2 Enterprise database.
-
getIsoCode
- Returns:
- This is a string up to three characters long contain the subdivision portion of the ISO 3166-2code.
-