public static class ForecastWeatherData.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 |
ForecastWeatherData.Forecast.Clouds
Parses data about clouds (from the JSON data)
and provides methods to get/access the information.
|
static class |
ForecastWeatherData.Forecast.Main
Parses data about main weather elements (from the JSON data)
and provides methods to get/access the information.
|
static class |
ForecastWeatherData.Forecast.Sys
Parses data about main weather elements (from the JSON data)
and provides methods to get/access the information.
|
static class |
ForecastWeatherData.Forecast.Weather
Parses data about weather (from the JSON data)
and provides methods to get/access the information.
|
static class |
ForecastWeatherData.Forecast.Wind
Parses data about wind (from the JSON data)
and provides methods to get/access the information.
|
AbstractWeatherData.Coord
Modifier and Type | Field and Description |
---|---|
private ForecastWeatherData.Forecast.Clouds |
clouds |
private java.lang.String |
dateTimeText
Date time text
|
private java.lang.String |
JSON_DATE_TIME_TEXT
Key for JSON variable
Date time text |
private java.lang.String |
JSON_SYS
Key for JSON object - Sys (pod, etc.)
|
private ForecastWeatherData.Forecast.Main |
main |
private ForecastWeatherData.Forecast.Sys |
sys |
private java.util.List<ForecastWeatherData.Forecast.Weather> |
weatherList
List of weather information (code, name, etc.)
|
private int |
weatherListCount
Count (number) of elements in list of weather information
|
private ForecastWeatherData.Forecast.Wind |
wind |
JSON_CLOUDS, JSON_COORD, JSON_MAIN, JSON_WEATHER, JSON_WIND
Constructor and Description |
---|
ForecastWeatherData.Forecast()
Non-parameterized constructor
|
ForecastWeatherData.Forecast(org.json.JSONObject jsonObj)
Parameterized constructor
Initializes variables from values from the given JSON object.
|
Modifier and Type | Method and Description |
---|---|
ForecastWeatherData.Forecast.Clouds |
getClouds_Object() |
java.lang.String |
getDateTimeText() |
ForecastWeatherData.Forecast.Main |
getMainData_Object() |
ForecastWeatherData.Forecast.Sys |
getSysData_Object() |
int |
getWeather_List_Count() |
java.util.List<ForecastWeatherData.Forecast.Weather> |
getWeather_List() |
ForecastWeatherData.Forecast.Wind |
getWind_Object() |
boolean |
hasDateTimeText() |
boolean |
hasWeather_List() |
getDateTime, hasDateTime
private final java.lang.String JSON_SYS
private final java.lang.String JSON_DATE_TIME_TEXT
Date time text
private final java.lang.String dateTimeText
private final ForecastWeatherData.Forecast.Clouds clouds
private final ForecastWeatherData.Forecast.Main main
private final ForecastWeatherData.Forecast.Sys sys
private final ForecastWeatherData.Forecast.Wind wind
private final java.util.List<ForecastWeatherData.Forecast.Weather> weatherList
private final int weatherListCount
public ForecastWeatherData.Forecast()
Initializes variables as per following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
public ForecastWeatherData.Forecast(org.json.JSONObject jsonObj)
jsonObj
- JSON object containing data about forecastspublic boolean hasDateTimeText()
public java.lang.String getDateTimeText()
public ForecastWeatherData.Forecast.Clouds getClouds_Object()
public ForecastWeatherData.Forecast.Main getMainData_Object()
public ForecastWeatherData.Forecast.Sys getSysData_Object()
public ForecastWeatherData.Forecast.Wind getWind_Object()
public boolean hasWeather_List()
public int getWeather_List_Count()
public java.util.List<ForecastWeatherData.Forecast.Weather> getWeather_List()