public static class ForecastWeatherData.Forecast.Main extends AbstractWeatherData.Main
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 | Field and Description |
---|---|
private float |
groundLevel
Ground level
|
private java.lang.String |
JSON_MAIN_GRND_LEVEL
Key for JSON variable
Main -> Ground level |
private java.lang.String |
JSON_MAIN_SEA_LEVEL
Key for JSON variable
Main -> Sea level |
private java.lang.String |
JSON_MAIN_TMP_KF
Key for JSON variable
Main -> Temperature KF |
private float |
seaLevel
Sea level
|
private float |
tempKF
Temperature KF
|
Constructor and Description |
---|
ForecastWeatherData.Forecast.Main()
Non-parameterized constructor
|
ForecastWeatherData.Forecast.Main(org.json.JSONObject jsonObj)
Parameterized constructor
Initializes variables from values from the given JSON object.
|
Modifier and Type | Method and Description |
---|---|
float |
getGroundLevel() |
float |
getSeaLevel() |
float |
getTempKF() |
boolean |
hasGroundLevel() |
boolean |
hasSeaLevel() |
boolean |
hasTempKF() |
getHumidity, getMaxTemperature, getMinTemperature, getPressure, getTemperature, hasHumidity, hasMaxTemperature, hasMinTemperature, hasPressure, hasTemperature
private final java.lang.String JSON_MAIN_SEA_LEVEL
Main -> Sea level
private final java.lang.String JSON_MAIN_GRND_LEVEL
Main -> Ground level
private final java.lang.String JSON_MAIN_TMP_KF
Main -> Temperature KF
private final float seaLevel
private final float groundLevel
private final float tempKF
public ForecastWeatherData.Forecast.Main()
Initializes variables as per following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
public ForecastWeatherData.Forecast.Main(org.json.JSONObject jsonObj)
jsonObj
- JSON object containing data about main
weather elements