public static class DailyForecastData.Forecast extends AbstractWeatherData
has
and
get
methods to access the information.
has
methods can be used to check if the data exists, i.e.,
if the data was available (successfully downloaded) and was parsed
correctly.
get
methods can be used to access the data, if the data
exists, otherwise get
methods will give value as per
following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
Modifier and Type | Class and Description |
---|---|
static class |
DailyForecastData.Forecast.Temperature
Parses data about temperature (from the JSON data) and provides
methods to get/access the information.
|
static class |
DailyForecastData.Forecast.Weather
Parses data about weather (from the JSON data) and provides methods
to get/access the information.
|
AbstractWeatherData.Clouds, AbstractWeatherData.Coord, AbstractWeatherData.Main, AbstractWeatherData.Wind
Modifier and Type | Field and Description |
---|---|
java.lang.String |
JSON_TEMP
Key for JSON object - Temperature
|
JSON_CLOUDS, JSON_COORD, JSON_MAIN, JSON_WEATHER, JSON_WIND
Constructor and Description |
---|
DailyForecastData.Forecast()
Non-parameterized constructor
|
DailyForecastData.Forecast(org.json.JSONObject jsonObj)
Parameterized constructor
|
Modifier and Type | Method and Description |
---|---|
float |
getHumidity() |
float |
getPercentageOfClouds() |
float |
getPressure() |
DailyForecastData.Forecast.Temperature |
getTemperature_Object() |
int |
getWeather_List_Count() |
java.util.List<DailyForecastData.Forecast.Weather> |
getWeather_List() |
float |
getWindDegree() |
float |
getWindSpeed() |
boolean |
hasHumidity() |
boolean |
hasPercentageOfClouds() |
boolean |
hasPressure() |
boolean |
hasWeather_List() |
boolean |
hasWindDegree() |
boolean |
hasWindSpeed() |
getDateTime, hasDateTime
public final java.lang.String JSON_TEMP
public DailyForecastData.Forecast()
Initializes variables as per following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
public DailyForecastData.Forecast(org.json.JSONObject jsonObj)
Initializes variables from values from the given JSON object.
jsonObj
- JSON object containing data about forecastspublic boolean hasHumidity()
public boolean hasPressure()
public boolean hasWindSpeed()
public boolean hasWindDegree()
public boolean hasPercentageOfClouds()
public float getHumidity()
public float getPressure()
public float getWindSpeed()
public float getWindDegree()
public float getPercentageOfClouds()
public DailyForecastData.Forecast.Temperature getTemperature_Object()
public boolean hasWeather_List()
public int getWeather_List_Count()
public java.util.List<DailyForecastData.Forecast.Weather> getWeather_List()