Enum AirQualityEnum
- java.lang.Object
-
- java.lang.Enum<AirQualityEnum>
-
- io.github.hapjava.characteristics.impl.airquality.AirQualityEnum
-
- All Implemented Interfaces:
CharacteristicEnum
,java.io.Serializable
,java.lang.Comparable<AirQualityEnum>
public enum AirQualityEnum extends java.lang.Enum<AirQualityEnum> implements CharacteristicEnum
0 ”Unknown” 1 ”Excellent” 2 ”Good” 3 ”Fair” 4 ”Inferior” 5 ”Poor”
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AirQualityEnum
fromCode(java.lang.Integer code)
int
getCode()
static AirQualityEnum
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AirQualityEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final AirQualityEnum UNKNOWN
-
EXCELLENT
public static final AirQualityEnum EXCELLENT
-
GOOD
public static final AirQualityEnum GOOD
-
FAIR
public static final AirQualityEnum FAIR
-
INFERIOR
public static final AirQualityEnum INFERIOR
-
POOR
public static final AirQualityEnum POOR
-
-
Method Detail
-
values
public static AirQualityEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AirQualityEnum c : AirQualityEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AirQualityEnum valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromCode
public static AirQualityEnum fromCode(java.lang.Integer code)
-
getCode
public int getCode()
- Specified by:
getCode
in interfaceCharacteristicEnum
-
-