Package com.maxmind.geoip2.model
Class AbstractCityResponse
- java.lang.Object
-
- com.maxmind.geoip2.model.AbstractResponse
-
- com.maxmind.geoip2.model.AbstractCountryResponse
-
- com.maxmind.geoip2.model.AbstractCityResponse
-
- Direct Known Subclasses:
CityResponse
,EnterpriseResponse
,InsightsResponse
public abstract class AbstractCityResponse extends AbstractCountryResponse
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description City
getCity()
Subdivision
getLeastSpecificSubdivision()
Location
getLocation()
Subdivision
getMostSpecificSubdivision()
Postal
getPostal()
List<Subdivision>
getSubdivisions()
-
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 Detail
-
getCity
public City getCity()
- Returns:
- City record for the requested IP address.
-
getLocation
public Location getLocation()
- Returns:
- Location record for the requested IP address.
-
getPostal
public Postal getPostal()
- Returns:
- the postal
-
getSubdivisions
public List<Subdivision> 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
public Subdivision 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
public Subdivision 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.
-
-