public abstract static class AbstractWeatherData.Weather
extends java.lang.Object
Weather
.
Standard behaviors like the has
and the get
methods for information about weather (for example, id, name,
description, icon, etc.) are defined here.
Constructor and Description |
---|
AbstractWeatherData.Weather()
Non-parameterized constructor
|
AbstractWeatherData.Weather(org.json.JSONObject jsonObj)
Parameterized constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getWeatherCode()
Returns data for code for weather of the city.
|
java.lang.String |
getWeatherDescription()
Returns data for description for weather of the city.
|
java.lang.String |
getWeatherIconName()
Returns data for name of icon for weather of the city.
|
java.lang.String |
getWeatherName()
Returns data for name for weather of the city.
|
boolean |
hasWeatherCode()
Tells if the data for weather's code is available or not.
|
boolean |
hasWeatherDescription()
Tells if the data for weather's description is available or not.
|
boolean |
hasWeatherIconName()
Tells if the data for name of weather's icon is available or not.
|
boolean |
hasWeatherName()
Tells if the data for weather's name is available or not.
|
public AbstractWeatherData.Weather()
Initializes variables as per following basis:
Boolean: false
Integral: Minimum value (MIN_VALUE)
Floating point: Not a number (NaN)
Others: null
public AbstractWeatherData.Weather(org.json.JSONObject jsonObj)
Initializes variables from values from the given JSON object.
jsonObj
- JSON object containing data about weather id, name,
etc.public boolean hasWeatherCode()
true
if data available, otherwise
false
public boolean hasWeatherName()
true
if data available, otherwise
false
public boolean hasWeatherDescription()
true
if data available, otherwise
false
public boolean hasWeatherIconName()
true
if data available, otherwise
false
public int getWeatherCode()
Integer.MIN_VALUE
public java.lang.String getWeatherName()
null
public java.lang.String getWeatherDescription()
null
public java.lang.String getWeatherIconName()
null