public class DailyForecastData
extends java.lang.Object
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)
Objects: Data initialized with default/non-parameterized constructor
Others: null
Modifier and Type | Class and Description |
---|---|
static class |
DailyForecastData.City
Parses data about city (from the JSON data) and provides methods to
get/access the information.
|
static class |
DailyForecastData.Forecast
Parses data about forecasts (from the JSON data) and provides methods to
get/access the information.
|
Constructor and Description |
---|
DailyForecastData(org.json.JSONObject jsonObj)
Parameterized constructor
|
Modifier and Type | Method and Description |
---|---|
DailyForecastData.City |
getCity_Object() |
int |
getForecast_List_Count() |
java.util.List<DailyForecastData.Forecast> |
getForecast_List() |
java.lang.String |
getResponseCode() |
int |
getResponseForecastCount() |
float |
getResponseTime() |
boolean |
hasForecast_List() |
boolean |
hasResponseCode() |
boolean |
hasResponseForecastCount() |
boolean |
hasResponseTime() |
public DailyForecastData(org.json.JSONObject jsonObj)
Initializes variables from values from the given JSON object.
jsonObj
- JSON object containing data about daily forecastspublic boolean hasResponseCode()
public boolean hasResponseTime()
public boolean hasResponseForecastCount()
public java.lang.String getResponseCode()
public float getResponseTime()
public int getResponseForecastCount()
public DailyForecastData.City getCity_Object()
public boolean hasForecast_List()
public int getForecast_List_Count()
public java.util.List<DailyForecastData.Forecast> getForecast_List()