Class GeoLocation


  • public final class GeoLocation
    extends Object
    The geo-location context attached to the ip entity.
    • Constructor Summary

      Constructors 
      Constructor Description
      GeoLocation()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Integer asn()
      Get the asn property: Autonomous System Number.
      String city()
      Get the city property: City name.
      String countryCode()
      Get the countryCode property: The country code according to ISO 3166 format.
      String countryName()
      Get the countryName property: Country name according to ISO 3166 Alpha 2: the lowercase of the English Short Name.
      Double latitude()
      Get the latitude property: The longitude of the identified location, expressed as a floating point number with range of -180 to 180, with positive numbers representing East and negative numbers representing West.
      Double longitude()
      Get the longitude property: The latitude of the identified location, expressed as a floating point number with range of - 90 to 90, with positive numbers representing North and negative numbers representing South.
      String state()
      Get the state property: State name.
      void validate()
      Validates the instance.
    • Constructor Detail

      • GeoLocation

        public GeoLocation()
    • Method Detail

      • asn

        public Integer asn()
        Get the asn property: Autonomous System Number.
        Returns:
        the asn value.
      • city

        public String city()
        Get the city property: City name.
        Returns:
        the city value.
      • countryCode

        public String countryCode()
        Get the countryCode property: The country code according to ISO 3166 format.
        Returns:
        the countryCode value.
      • countryName

        public String countryName()
        Get the countryName property: Country name according to ISO 3166 Alpha 2: the lowercase of the English Short Name.
        Returns:
        the countryName value.
      • latitude

        public Double latitude()
        Get the latitude property: The longitude of the identified location, expressed as a floating point number with range of -180 to 180, with positive numbers representing East and negative numbers representing West. Latitude and longitude are derived from the city or postal code.
        Returns:
        the latitude value.
      • longitude

        public Double longitude()
        Get the longitude property: The latitude of the identified location, expressed as a floating point number with range of - 90 to 90, with positive numbers representing North and negative numbers representing South. Latitude and longitude are derived from the city or postal code.
        Returns:
        the longitude value.
      • state

        public String state()
        Get the state property: State name.
        Returns:
        the state value.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.