Enum UnitSystem
- All Implemented Interfaces:
Serializable, Comparable<UnitSystem>, java.lang.constant.Constable
An enumeration for supported unit systems with helper methods.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns temperature unit for current unit system.getValue()Returns unit system value.Returns wind unit for current unit system.static UnitSystemReturns the enum constant of this type with the specified name.static UnitSystem[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
METRIC
Metric units: Celsius, meter/sec, hPa, mm(rain, snow). -
IMPERIAL
Imperial units: Fahrenheit, miles/hour, hPa, mm(rain, snow). -
STANDARD
OpenWeatherMap standard units: Kelvin, meter/sec, hPa, mm(rain, snow).
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getWindUnit
-
getTemperatureUnit
Returns temperature unit for current unit system.- Returns:
- temperature unit.
-
getValue
-