java.lang.Object |
↳ |
lineageos.weather.WeatherInfo.Builder |
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
WeatherInfo.Builder
(String cityName, double temperature, int tempUnit)
Parameters |
cityName |
String : A valid city name. Attempting to pass null will get you an
IllegalArgumentException |
temperature |
double : A valid temperature value. Attempting pass an invalid double value,
will get you an IllegalArgumentException |
tempUnit |
int : A valid temperature unit value. See
WeatherContract.WeatherColumns.TempUnit for
valid values. Attempting to pass an invalid temperature unit will get you
an IllegalArgumentException
|
Public Methods
Combine all of the options that have been set and return a new WeatherInfo
object
Parameters |
forecasts |
List : A valid array list of WeatherInfo.DayForecast objects. Attempting to pass
null will get you an IllegalArgumentException' |
Parameters |
humidity |
double : The weather humidity. Attempting to pass an invalid double value will get
you an IllegalArgumentException |
Parameters |
timeStamp |
long : A timestamp indicating when this data was generated. If timestamps is
not set, then the builder will set it to the time of object creation |
public
WeatherInfo.Builder
setTodaysHigh
(double todaysHigh)
Parameters |
todaysHigh |
double : Today's high temperature. Attempting to pass an invalid double value
will get you an IllegalArgumentException |
public
WeatherInfo.Builder
setTodaysLow
(double todaysLow)
Parameters |
todaysLow |
double : Today's low temperature. Attempting to pass an invalid double value will
get you an IllegalArgumentException |
public
WeatherInfo.Builder
setWind
(double windSpeed, double windDirection, int windSpeedUnit)
Parameters |
windSpeed |
double : The wind speed. Attempting to pass an invalid double value will get you
an IllegalArgumentException |
windDirection |
double : The wind direction. Attempting to pass an invalid double value will
get you an IllegalArgumentException |
windSpeedUnit |
int : A valid wind speed direction unit. See
WeatherContract.WeatherColumns.WindSpeedUnit
for valid values. Attempting to pass an invalid speed unit will get
you an IllegalArgumentException |