Class Atmosphere

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Atmosphere
    extends Object
    implements Serializable, Cloneable
    Forecast information about current atmospheric pressure, humidity, and visibility. Attributes:
    • humidity: humidity, in percent (integer)
    • visibility, in the units specified by the distance attribute of the yweather:units element (mi or km). Note that the visibility is specified as the actual value * 100. For example, a visibility of 16.5 miles will be specified as 1650. A visibility of 14 kilometers will appear as 1400. (integer) [ A double here, and adjusted accordingly]
    • pressure: barometric pressure, in the units specified by the pressure attribute of the yweather:units element (in or mb). (float).
    • rising: state of the barometric pressure: steady (0), rising (1), or falling (2). (integer: 0, 1, 2)
    See Also:
    Serialized Form
    • Constructor Detail

      • Atmosphere

        public Atmosphere()
        Simple constructor.
      • Atmosphere

        public Atmosphere​(int humidity,
                          double visibility,
                          double pressure,
                          Atmosphere.PressureChange change)
        Parameters:
        humidity - humidity, in percent
        visibility - visibility distance (value beyond 1/100ths of a unit will be truncated)
        pressure - barometric pressure
        change - state of the barometric pressure
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getHumidity

        public int getHumidity()
        Relative humidity
        Returns:
        humidity, in percent
      • setHumidity

        public void setHumidity​(int humidity)
        Relative humidity
        Parameters:
        humidity - humidity, in percent
      • getVisibility

        public double getVisibility()
        Visibility distance
        Returns:
        distance
      • setVisibility

        public void setVisibility​(double visibility)
        Visibility distance
        Parameters:
        visibility - distance (value beyond 1/100ths of a unit will be truncated)
      • getPressure

        public double getPressure()
        Barometric pressure
        Returns:
        pressure
      • setPressure

        public void setPressure​(double pressure)
        Barometric pressure
        Parameters:
        pressure - pressure
      • setChange

        public void setChange​(Atmosphere.PressureChange change)
        Change in pressure
        Parameters:
        change - PressureChange object