Class GeoLocation.Builder

  • Enclosing class:
    GeoLocation

    public static final class GeoLocation.Builder
    extends Object
    A builder class to which builds geo location objects.
    • Method Detail

      • language

        public GeoLocation.Builder language​(Locale language)
        Sets the natural language of location data.
        Parameters:
        language - The language.
        Returns:
        The builder.
      • accuracy

        public GeoLocation.Builder accuracy​(Double accuracy)
        Sets the horizontal GPS error in meters.
        Parameters:
        accuracy - The accuracy.
        Returns:
        The builder.
      • altitude

        public GeoLocation.Builder altitude​(Double altitude)
        Sets the altitude in meters above or below sea level.
        Parameters:
        altitude - The altitude.
        Returns:
        The builder.
      • altitudeAccuracy

        public GeoLocation.Builder altitudeAccuracy​(Double altitudeAccuracy)
        Sets the vertical GPS error in meters.
        Parameters:
        altitudeAccuracy - The vertical GPS error in meters.
        Returns:
        The builder.
      • area

        public GeoLocation.Builder area​(String area)
        Sets a named area such as a campus or neighborhood.
        Parameters:
        area - The area.
        Returns:
        The builder.
      • bearing

        public GeoLocation.Builder bearing​(Double bearing)
        Sets the GPS bearing (direction in which the entity is heading to reach its next waypoint), measured in decimal degrees relative to true north.
        Parameters:
        bearing - The bearing.
        Returns:
        The builder.
      • building

        public GeoLocation.Builder building​(String building)
        Sets a specific building on a street or in an area.
        Parameters:
        building - The building.
        Returns:
        The builder.
      • country

        public GeoLocation.Builder country​(String country)
        Sets the nation where the user is located.
        Parameters:
        country - The country.
        Returns:
        The builder.
      • countryCode

        public GeoLocation.Builder countryCode​(String countryCode)
        Sets the ISO 3166 two-letter country code.
        Parameters:
        countryCode - The country code.
        Returns:
        The builder.
      • datum

        public GeoLocation.Builder datum​(String datum)
        Sets the GPS datum.
        Parameters:
        datum - The GPS datum.
        Returns:
        The builder.
      • description

        public GeoLocation.Builder description​(String description)
        Sets a natural-language name for or description of the location.
        Parameters:
        description - The description.
        Returns:
        The builder.
      • floor

        public GeoLocation.Builder floor​(String floor)
        Sets a particular floor in a building.
        Parameters:
        floor - The floor.
        Returns:
        The builder.
      • latitude

        public GeoLocation.Builder latitude​(Double latitude)
        Sets the latitude in decimal degrees North.
        Parameters:
        latitude - The latitude.
        Returns:
        The builder.
      • locality

        public GeoLocation.Builder locality​(String locality)
        Sets a locality within the administrative region, such as a town or city.
        Parameters:
        locality - The locality.
        Returns:
        The builder.
      • longitude

        public GeoLocation.Builder longitude​(Double longitude)
        Sets the longitude in decimal degrees East.
        Parameters:
        longitude - The longitude.
        Returns:
        The builder.
      • postalCode

        public GeoLocation.Builder postalCode​(String postalCode)
        Sets a code used for postal delivery.
        Parameters:
        postalCode - The postal code.
        Returns:
        The builder.
      • region

        public GeoLocation.Builder region​(String region)
        Sets an administrative region of the nation, such as a state or province.
        Parameters:
        region - The region.
        Returns:
        The builder.
      • room

        public GeoLocation.Builder room​(String room)
        Sets a particular room in a building.
        Parameters:
        room - The room.
        Returns:
        The builder.
      • speed

        public GeoLocation.Builder speed​(Double speed)
        Sets the speed at which the entity is moving, in meters per second.
        Parameters:
        speed - The speed.
        Returns:
        The builder.
      • street

        public GeoLocation.Builder street​(String street)
        Sets a thoroughfare within the locality, or a crossing of two thoroughfares.
        Parameters:
        street - The street.
        Returns:
        The builder.
      • text

        public GeoLocation.Builder text​(String text)
        Sets a catch-all element that captures any other information about the location.
        Parameters:
        text - The text.
        Returns:
        The builder.
      • timestamp

        public GeoLocation.Builder timestamp​(Instant timestamp)
        Sets the UTC timestamp specifying the moment when the reading was taken.
        Parameters:
        timestamp - The timestamp.
        Returns:
        The builder.
      • timeZoneOffset

        public GeoLocation.Builder timeZoneOffset​(ZoneOffset zoneOffset)
        Sets the time zone offset from UTC for the current location.
        Parameters:
        zoneOffset - The time zone offset.
        Returns:
        The builder.
      • uri

        public GeoLocation.Builder uri​(URI uri)
        Sets a URI or URL pointing to information about the location.
        Parameters:
        uri - The URI.
        Returns:
        The builder.
      • build

        public GeoLocation build()
        Builds the geo location.
        Returns:
        The geo location.