Enum UnitSystem

java.lang.Object
java.lang.Enum<UnitSystem>
com.github.prominence.openweathermap.api.enums.UnitSystem
All Implemented Interfaces:
Serializable, Comparable<UnitSystem>, java.lang.constant.Constable

public enum UnitSystem extends Enum<UnitSystem>
An enumeration for supported unit systems with helper methods.
  • Enum Constant Details

    • METRIC

      public static final UnitSystem METRIC
      Metric units: Celsius, meter/sec, hPa, mm(rain, snow).
    • IMPERIAL

      public static final UnitSystem IMPERIAL
      Imperial units: Fahrenheit, miles/hour, hPa, mm(rain, snow).
    • STANDARD

      public static final UnitSystem STANDARD
      OpenWeatherMap standard units: Kelvin, meter/sec, hPa, mm(rain, snow).
  • Method Details

    • values

      public static UnitSystem[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static UnitSystem valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getWindUnit

      public String getWindUnit()
      Returns wind unit for current unit system.
      Returns:
      wind unit.
    • getTemperatureUnit

      public String getTemperatureUnit()
      Returns temperature unit for current unit system.
      Returns:
      temperature unit.
    • getValue

      public String getValue()
      Returns unit system value.
      Returns:
      value unit system.