public abstract class AbstractForecast
extends java.lang.Object
Provides default behaviours and implementations for:
1. HourlyForecast
2. DailyForecast
It defines common methods like has
, get
and some others.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractForecast.City
Provides default behaviours for City
|
static class |
AbstractForecast.Forecast
Parses forecast data (one element in the forecastList) and provides methods to get/access the same information.
|
Modifier and Type | Method and Description |
---|---|
AbstractForecast.City |
getCityInstance() |
int |
getForecastCount() |
double |
getMessage() |
java.lang.String |
getRawResponse() |
int |
getResponseCode() |
boolean |
hasCityInstance() |
boolean |
hasForecastCount() |
boolean |
hasMessage() |
boolean |
hasRawResponse() |
boolean |
hasResponseCode() |
boolean |
isValid() |
public boolean hasMessage()
true
if message is available, otherwise false
.public boolean hasForecastCount()
true
if count of forecasts is available, otherwise false
.public boolean hasCityInstance()
true
if message is available, otherwise false
.public double getMessage()
Double.NaN
.public int getForecastCount()
0
.public AbstractForecast.City getCityInstance()
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
.