Enum ValveTypeEnum
- java.lang.Object
-
- java.lang.Enum<ValveTypeEnum>
-
- io.github.hapjava.characteristics.impl.valve.ValveTypeEnum
-
- All Implemented Interfaces:
CharacteristicEnum,Serializable,Comparable<ValveTypeEnum>
public enum ValveTypeEnum extends Enum<ValveTypeEnum> implements CharacteristicEnum
The mode used by aValveAccessory0 ”Generic valve” 1 ”Irrigation” 2 ”Shower head” 3 ”Water faucet” 4-255 ”Reserved”
- Author:
- Tim Harper
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GENERICIRRIGATIONSHOWERWATER_FAUCET
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValveTypeEnumfromCode(Integer code)intgetCode()static ValveTypeEnumvalueOf(String name)Returns the enum constant of this type with the specified name.static ValveTypeEnum[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GENERIC
public static final ValveTypeEnum GENERIC
-
IRRIGATION
public static final ValveTypeEnum IRRIGATION
-
SHOWER
public static final ValveTypeEnum SHOWER
-
WATER_FAUCET
public static final ValveTypeEnum WATER_FAUCET
-
-
Method Detail
-
values
public static ValveTypeEnum[] 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 (ValveTypeEnum c : ValveTypeEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValveTypeEnum 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 nameNullPointerException- if the argument is null
-
fromCode
public static ValveTypeEnum fromCode(Integer code)
-
getCode
public int getCode()
- Specified by:
getCodein interfaceCharacteristicEnum
-
-