public abstract class AbstractWeather
extends java.lang.Object
Provides default behaviours and implementations for:
1. CurrentWeather
It defines common methods like has
, get
and some others.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractWeather.Clouds
Provides default behaviours for Cloud
|
static class |
AbstractWeather.Coord
Provides default behaviours for Coord, i.e., coordinates.
|
static class |
AbstractWeather.Main
Provides default behaviours for Main, i.e., main weather elements like temperature, humidity, etc.
|
static class |
AbstractWeather.Weather
Parses weather data and provides methods to get/access the same information.
|
static class |
AbstractWeather.Wind
Provides default behaviours for Wind.
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getDateTime() |
java.lang.String |
getRawResponse() |
int |
getResponseCode() |
int |
getWeatherCount() |
AbstractWeather.Weather |
getWeatherInstance(int index) |
boolean |
hasDateTime() |
boolean |
hasRawResponse() |
boolean |
hasResponseCode() |
boolean |
hasWeatherInstance() |
boolean |
isValid() |
public boolean hasDateTime()
true
if date/time is available, otherwise false
.public boolean hasWeatherInstance()
true
if Weather instance(s) is available, otherwise false
.public java.util.Date getDateTime()
null
.public int getWeatherCount()
public AbstractWeather.Weather getWeatherInstance(int index)
index
- Index of Weather instance in the list.null
.public boolean isValid()
true
if response is valid (downloaded and parsed correctly), otherwise false
.public boolean hasResponseCode()
true
if response code is available, otherwise false
.public boolean hasRawResponse()
true
if raw response is available, otherwise false
.public int getResponseCode()
Integer.MIN_VALUE
.public java.lang.String getRawResponse()
null
.