Class Clouds

java.lang.Object
com.github.prominence.openweathermap.api.model.Clouds

public class Clouds extends Object
The Clouds type represents cloudiness value percentage. Its value can only be an integer in [0, 100] range.
  • Method Details

    • withValue

      public static Clouds withValue(byte value)
      Static method for Clouds creation with value checking.
      Parameters:
      value - clouds percentage value.
      Returns:
      instantiated Clouds object.
    • getValue

      public byte getValue()
      Returns cloudiness percentage value.
      Returns:
      cloudiness percentage.
    • setValue

      public void setValue(byte value)
      Sets cloudiness percentage value.
      Parameters:
      value - new cloudiness value.
      Throws:
      IllegalArgumentException - in case if provided value isn't in allowed range.
    • getUnit

      public String getUnit()
      Returns cloudiness unitSystem. Constantly equals to '%'.
      Returns:
      the cloudiness 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