net.aksingh.owmjapis
Class DailyForecast

java.lang.Object
  extended by net.aksingh.owmjapis.AbstractForecast
      extended by net.aksingh.owmjapis.DailyForecast

public class DailyForecast
extends AbstractForecast

Parses daily forecast data and provides methods to get/access the same information. This class provides 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

Since:
2.5.0.3
Version:
2014/12/27
Author:
Ashutosh Kumar Singh
See Also:
OWM's Weather Forecast API

Nested Class Summary
static class DailyForecast.Forecast
           Parses forecast data (one element in the forecastList) and provides methods to get/access the same information.
 
Nested classes/interfaces inherited from class net.aksingh.owmjapis.AbstractForecast
AbstractForecast.City
 
Method Summary
 DailyForecast.Forecast getForecastInstance(int index)
           
 java.lang.String getRawResponse()
           
 int getResponseCode()
           
 boolean hasRawResponse()
           
 boolean hasResponseCode()
           
 boolean isValid()
           
 
Methods inherited from class net.aksingh.owmjapis.AbstractForecast
getCityInstance, getForecastCount, getMessage, hasCityInstance, hasForecastCount, hasMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getForecastInstance

public DailyForecast.Forecast getForecastInstance(int index)
Parameters:
index - Index of Forecast instance in the list.
Returns:
Forecast instance if available, otherwise null.

isValid

public boolean isValid()
Returns:
true if response is valid (downloaded and parsed correctly), otherwise false.

hasResponseCode

public boolean hasResponseCode()
Returns:
true if response code is available, otherwise false.

hasRawResponse

public boolean hasRawResponse()
Returns:
true if raw response is available, otherwise false.

getResponseCode

public int getResponseCode()
Returns:
Response code if available, otherwise Integer.MIN_VALUE.

getRawResponse

public java.lang.String getRawResponse()
Returns:
Raw response if available, otherwise null.