Class Location.LocationBuilder

  • Enclosing class:
    Location

    public static class Location.LocationBuilder
    extends Object
    • Constructor Detail

      • LocationBuilder

        LocationBuilder()
    • Method Detail

      • city

        public Location.LocationBuilder city​(String city)
        The city name of the represented location if it can be determined, otherwise null.
        Returns:
        this.
        Since:
        13.0
      • countryCode

        public Location.LocationBuilder countryCode​(String countryCode)
        The two letter country code (ISO 3166-1 alpha code) of the represented location if it can be determined, otherwise null.
        Returns:
        this.
        Since:
        13.0
      • countryName

        public Location.LocationBuilder countryName​(String countryName)
        The full country name of the represented location if it can be determined, otherwise null.
        Returns:
        this.
        Since:
        13.0
      • countryGeoNameId

        public Location.LocationBuilder countryGeoNameId​(Integer countryGeoNameId)
        The GeoName ID of the country.
        Returns:
        this.
        Since:
        15.24
      • latitude

        public Location.LocationBuilder latitude​(Double latitude)

        The latitude of the represented location.

        Defaults to zero if it cannot be determined even though that represents a legitimate location.

        Returns:
        this.
        Since:
        13.0
      • longitude

        public Location.LocationBuilder longitude​(Double longitude)

        The longitude of the represented location.

        Defaults to zero if it cannot be determined even though that represents a legitimate location.

        Returns:
        this.
        Since:
        13.0
      • metroCode

        public Location.LocationBuilder metroCode​(Integer metroCode)
        The metro code of the represented location if it can be determined, otherwise zero.
        Returns:
        this.
        Since:
        13.0
      • postalCode

        public Location.LocationBuilder postalCode​(String postalCode)
        The postal code of the represented location if it can be determined, otherwise null.
        Returns:
        this.
        Since:
        13.0
      • subdivisions

        public Location.LocationBuilder subdivisions​(List<Location.Subdivision> subdivisions)
        The subdivisions of the location. This will generally hold the sate or province the location is in, however it depends on on the particular country. Some locations may have multiple subdivisions. The order is from the least specific to most specific division.
        Returns:
        this.
        Since:
        15.24