Class AtmosphericPressure

java.lang.Object
com.github.prominence.openweathermap.api.model.onecall.AtmosphericPressure

public class AtmosphericPressure extends Object
The AtmosphericPressure type represents atmospheric pressure value. Its value can only be a double in [0, +∞) range.
  • Method Details

    • withValue

      public static AtmosphericPressure withValue(double seaLevelValue)
      Static method for AtmosphericPressure creation with value checking.
      Parameters:
      seaLevelValue - atmospheric pressure value.
      Returns:
      instantiated AtmosphericPressure object.
    • getSeaLevelValue

      public Double getSeaLevelValue()
      Gets sea level value.
      Returns:
      the sea level value.
    • setSeaLevelValue

      public void setSeaLevelValue(double seaLevelValue)
      Sets sea level value.
      Parameters:
      seaLevelValue - the sea level value.
      Throws:
      IllegalArgumentException - in case if provided value isn't in allowed range.
    • getUnit

      public String getUnit()
      Returns pressure unitSystem. Constantly equals to 'hPa'.
      Returns:
      the pressure unitSystem.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object