net.aksingh.owmjapis
Class AbstractWeather.Weather

java.lang.Object
  extended by net.aksingh.owmjapis.AbstractWeather.Weather
Enclosing class:
AbstractWeather

public static class AbstractWeather.Weather
extends java.lang.Object

Parses weather 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

Method Summary
 int getWeatherCode()
           
 java.lang.String getWeatherDescription()
           
 java.lang.String getWeatherIconName()
           
 java.lang.String getWeatherName()
           
 boolean hasWeatherCode()
          Tells if weather's code is available or not.
 boolean hasWeatherDescription()
          Tells if weather's description is available or not.
 boolean hasWeatherIconName()
          Tells if name of weather's icon is available or not.
 boolean hasWeatherName()
          Tells if weather's name is available or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasWeatherCode

public boolean hasWeatherCode()
Tells if weather's code is available or not.

Returns:
true if data available, otherwise false.

hasWeatherName

public boolean hasWeatherName()
Tells if weather's name is available or not.

Returns:
true if data available, otherwise false.

hasWeatherDescription

public boolean hasWeatherDescription()
Tells if weather's description is available or not.

Returns:
true if data available, otherwise false.

hasWeatherIconName

public boolean hasWeatherIconName()
Tells if name of weather's icon is available or not.

Returns:
true if data available, otherwise false.

getWeatherCode

public int getWeatherCode()
Returns:
Code for weather of the city if available, otherwise Integer.MIN_VALUE.

getWeatherName

public java.lang.String getWeatherName()
Returns:
Name for weather of the city if available, otherwise null.

getWeatherDescription

public java.lang.String getWeatherDescription()
Returns:
Description for weather of the city if available, otherwise null.

getWeatherIconName

public java.lang.String getWeatherIconName()
Returns:
Name of icon for weather of the city if available, otherwise null.