Class AtmosphericPressure
java.lang.Object
com.github.prominence.openweathermap.api.model.onecall.AtmosphericPressure
The AtmosphericPressure type represents atmospheric pressure value.
Its value can only be a double in [0, +∞) range.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanGets sea level value.getUnit()Returns pressure unitSystem.inthashCode()voidsetSeaLevelValue(double seaLevelValue) Sets sea level value.toString()static AtmosphericPressurewithValue(double seaLevelValue) Static method forAtmosphericPressurecreation with value checking.
-
Method Details
-
withValue
Static method forAtmosphericPressurecreation with value checking.- Parameters:
seaLevelValue- atmospheric pressure value.- Returns:
- instantiated
AtmosphericPressureobject.
-
getSeaLevelValue
-
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
Returns pressure unitSystem. Constantly equals to 'hPa'.- Returns:
- the pressure unitSystem.
-
equals
-
hashCode
-
toString
-