public abstract static class AbstractWeatherData.Clouds
extends java.lang.Object
Clouds
.
Standard behaviors like the has
and the get
methods for information about clouds (for example, percentage of
clouds, etc.) are defined here.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
JSON_CLOUDS_ALL
Key for JSON variable
Clouds -> All
(percentage of all clouds) |
private float |
percentOfClouds
Percentage of all clouds
|
Constructor and Description |
---|
AbstractWeatherData.Clouds()
Non-parameterized constructor
|
AbstractWeatherData.Clouds(org.json.JSONObject jsonObj)
Parameterized constructor
Initializes variables from values from the given JSON object.
|
Modifier and Type | Method and Description |
---|---|
float |
getPercentageOfClouds()
Returns data for percentage of all clouds.
|
boolean |
hasPercentageOfClouds()
Tells if the data for percentage of all clouds is available or not.
|
private final java.lang.String JSON_CLOUDS_ALL
Clouds -> All
(percentage of all clouds)private final float percentOfClouds
public AbstractWeatherData.Clouds()
Initializes variables as per following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
public AbstractWeatherData.Clouds(org.json.JSONObject jsonObj)
jsonObj
- JSON object containing data about cloudspublic boolean hasPercentageOfClouds()
true
if data available, otherwise false
public float getPercentageOfClouds()
Float.NaN
, i.e., Not a Number.