Class RepresentedCountry


public final class RepresentedCountry extends Country

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 Details

    • RepresentedCountry

      public RepresentedCountry()
      Constructs an instance of RepresentedCountry 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 of RepresentedCountry.
      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

      public RepresentedCountry(RepresentedCountry country, List<String> locales)
      Constructs an instance of RepresentedCountry.
      Parameters:
      country - The RepresentedCountry object to copy.
      locales - The locales to use.
  • Method Details

    • getType

      public String 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.