Class Humidity
java.lang.Object
com.github.prominence.openweathermap.api.model.Humidity
The Humidity type represents humidity value percentage.
Its value can only be an integer in [0, 100] range.
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetUnit()Returns humidity unitSystem.intgetValue()Returns humidity percentage value.inthashCode()voidsetValue(int value) Sets humidity percentage value.toString()static HumiditywithValue(byte value) CreatesHumidityobject with safeguard to have min 0 and max 100 as value
-
Method Details
-
withValue
-
getValue
public int getValue()Returns humidity percentage value.- Returns:
- humidity percentage.
-
setValue
public void setValue(int value) Sets humidity percentage value.- Parameters:
value- new humidity value. Rounds to 0 or 100 if provided value isn't in allowed range.
-
getUnit
Returns humidity unitSystem. Constantly equals to '%'.- Returns:
- the humidity unitSystem.
-
equals
-
hashCode
-
toString
-