public static class

WeatherLocation.Builder

extends Object
java.lang.Object
   ↳ lineageos.weather.WeatherLocation.Builder

Class Overview

Builder class for WeatherLocation

Summary

Public Constructors
WeatherLocation.Builder(String cityId, String cityName)
WeatherLocation.Builder(String cityName)
Public Methods
WeatherLocation build()
Combine all of the options that have been set and return a new WeatherLocation object
WeatherLocation.Builder setCountry(String country)
WeatherLocation.Builder setCountryId(String countryId)
WeatherLocation.Builder setPostalCode(String postalCode)
WeatherLocation.Builder setState(String state)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public WeatherLocation.Builder (String cityId, String cityName)

added in API level 5

Parameters
cityId String: An identifier for the city (for example WOEID - Where On Earth IDentifier)
cityName String: The name of the city

public WeatherLocation.Builder (String cityName)

added in API level 5

Parameters
cityName String: The name of the city

Public Methods

public WeatherLocation build ()

added in API level 5

Combine all of the options that have been set and return a new WeatherLocation object

Returns
WeatherLocation WeatherLocation

public WeatherLocation.Builder setCountry (String country)

added in API level 5

Parameters
country String: The country name
Returns
WeatherLocation.Builder The WeatherLocation.Builder instance

public WeatherLocation.Builder setCountryId (String countryId)

added in API level 5

Parameters
countryId String: An identifier for the country (for example ISO alpha-2, ISO alpha-3, ISO 3166-1 numeric-3, etc)
Returns
WeatherLocation.Builder The WeatherLocation.Builder instance

public WeatherLocation.Builder setPostalCode (String postalCode)

added in API level 5

Parameters
postalCode String: The postal/ZIP code
Returns
WeatherLocation.Builder The WeatherLocation.Builder instance

public WeatherLocation.Builder setState (String state)

added in API level 5

Parameters
state String: The state or territory where the city is located
Returns
WeatherLocation.Builder The WeatherLocation.Builder instance