net.aksingh.owmjapis
Class DailyForecast.Forecast

java.lang.Object
  extended by net.aksingh.owmjapis.AbstractWeather
      extended by net.aksingh.owmjapis.AbstractForecast.Forecast
          extended by net.aksingh.owmjapis.DailyForecast.Forecast
Enclosing class:
DailyForecast

public static class DailyForecast.Forecast
extends AbstractForecast.Forecast

Parses forecast data (one element in the forecastList) 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


Nested Class Summary
static class DailyForecast.Forecast.Temperature
           Parses temperature data and provides methods to get/access the same information.
 
Nested classes/interfaces inherited from class net.aksingh.owmjapis.AbstractWeather
AbstractWeather.Clouds, AbstractWeather.Coord, AbstractWeather.Main, AbstractWeather.Weather, AbstractWeather.Wind
 
Field Summary
 java.lang.String JSON_TEMP
           
 
Method Summary
 float getHumidity()
           
 float getPercentageOfClouds()
           
 float getPressure()
           
 float getRain()
           
 java.lang.String getRawResponse()
           
 int getResponseCode()
           
 float getSnow()
           
 DailyForecast.Forecast.Temperature getTemperatureInstance()
           
 float getWindDegree()
           
 float getWindSpeed()
           
 boolean hasHumidity()
           
 boolean hasPercentageOfClouds()
           
 boolean hasPressure()
           
 boolean hasRain()
           
 boolean hasRawResponse()
           
 boolean hasResponseCode()
           
 boolean hasSnow()
           
 boolean hasWindDegree()
           
 boolean hasWindSpeed()
           
 boolean isValid()
           
 
Methods inherited from class net.aksingh.owmjapis.AbstractWeather
getDateTime, getWeatherCount, getWeatherInstance, hasDateTime, hasWeatherInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JSON_TEMP

public final java.lang.String JSON_TEMP
See Also:
Constant Field Values
Method Detail

hasHumidity

public boolean hasHumidity()

hasPressure

public boolean hasPressure()

hasWindSpeed

public boolean hasWindSpeed()

hasWindDegree

public boolean hasWindDegree()

hasPercentageOfClouds

public boolean hasPercentageOfClouds()

hasRain

public boolean hasRain()

hasSnow

public boolean hasSnow()

getHumidity

public float getHumidity()

getPressure

public float getPressure()

getWindSpeed

public float getWindSpeed()

getWindDegree

public float getWindDegree()

getPercentageOfClouds

public float getPercentageOfClouds()

getRain

public float getRain()

getSnow

public float getSnow()

getTemperatureInstance

public DailyForecast.Forecast.Temperature getTemperatureInstance()

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.