java.lang.Object
com.maxmind.geoip2.model.AbstractResponse
com.maxmind.geoip2.model.AbstractCountryResponse
com.maxmind.geoip2.model.AbstractCityResponse
- Direct Known Subclasses:
CityResponse
,EnterpriseResponse
,InsightsResponse
Abstract class for models that contain City data.
-
Method Summary
Methods inherited from class com.maxmind.geoip2.model.AbstractCountryResponse
getContinent, getCountry, getMaxMind, getRegisteredCountry, getRepresentedCountry, getTraits
Methods inherited from class com.maxmind.geoip2.model.AbstractResponse
toJson, toString
-
Method Details
-
getCity
- Returns:
- City record for the requested IP address.
-
getLocation
- Returns:
- Location record for the requested IP address.
-
getPostal
- Returns:
- the postal
-
getSubdivisions
- Returns:
- An
List
ofSubdivision
objects representing the country subdivisions for the requested IP address. The number and type of subdivisions varies by country, but a subdivision is typically a state, province, county, etc. Subdivisions are ordered from most general (largest) to most specific (smallest). If the response did not contain any subdivisions, this method returns an empty array.
-
getMostSpecificSubdivision
- Returns:
- An object representing the most specific subdivision returned. If
the response did not contain any subdivisions, this method
returns an empty
Subdivision
object.
-
getLeastSpecificSubdivision
- Returns:
- An object representing the least specific subdivision returned. If
the response did not contain any subdivisions, this method
returns an empty
Subdivision
object.
-