net.aksingh.owmjapis
Class AbstractWeather.Main

java.lang.Object
  extended by net.aksingh.owmjapis.AbstractWeather.Main
Direct Known Subclasses:
CurrentWeather.Main, HourlyForecast.Forecast.Main
Enclosing class:
AbstractWeather

public abstract static class AbstractWeather.Main
extends java.lang.Object

Provides default behaviours for Main, i.e., main weather elements like temperature, humidity, etc.

Since:
2.5.0.1
Version:
2013/12/23
Author:
Ashutosh Kumar Singh

Method Summary
 float getHumidity()
           
 float getMaxTemperature()
           
 float getMinTemperature()
           
 float getPressure()
           
 float getTemperature()
           
 boolean hasHumidity()
          Tells if humidity of the city is available or not.
 boolean hasMaxTemperature()
          Tells if the maximum temperature of the city is available or not.
 boolean hasMinTemperature()
          Tells if the minimum temperature of the city is available or not.
 boolean hasPressure()
          Tells if pressure of the city is available or not.
 boolean hasTemperature()
          Tells if the temperature of the city is available or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasTemperature

public boolean hasTemperature()
Tells if the temperature of the city is available or not.

Returns:
true if data available, otherwise false

hasMinTemperature

public boolean hasMinTemperature()
Tells if the minimum temperature of the city is available or not.

Returns:
true if data available, otherwise false

hasMaxTemperature

public boolean hasMaxTemperature()
Tells if the maximum temperature of the city is available or not.

Returns:
true if data available, otherwise false

hasPressure

public boolean hasPressure()
Tells if pressure of the city is available or not.

Returns:
true if data available, otherwise false

hasHumidity

public boolean hasHumidity()
Tells if humidity of the city is available or not.

Returns:
true if data available, otherwise false

getTemperature

public float getTemperature()
Returns:
Temperature of the city if available, otherwise Float.NaN.

getMinTemperature

public float getMinTemperature()
Returns:
Minimum temperature of the city if available, otherwise Float.NaN.

getMaxTemperature

public float getMaxTemperature()
Returns:
Maximum temperature of the city if available, otherwise Float.NaN.

getPressure

public float getPressure()
Returns:
Pressure of the city if available, otherwise Float.NaN.

getHumidity

public float getHumidity()
Returns:
Humidity of the city if available, otherwise Float.NaN.