Enum MeasurementUnit
- java.lang.Object
-
- java.lang.Enum<MeasurementUnit>
-
- com.github.kaklakariada.fritzbox.model.homeautomation.MeasurementUnit
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<MeasurementUnit>
public enum MeasurementUnit extends java.lang.Enum<MeasurementUnit>
provide the measurement unit to be used with the statistics.Consists of:
- measurment unit [V, W, Wh, %]
- precision as double to multiply with the gathered Integerv
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ENERGYHUMIDITYPOWERTEMPERATUREVOLTAGE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>getMapper()static MeasurementUnitgetMatchingMeasurementUnit(java.lang.Class<?> caller)java.lang.NumbergetPrescision()java.lang.StringgetUnit()static MeasurementUnitvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static MeasurementUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TEMPERATURE
public static final MeasurementUnit TEMPERATURE
-
VOLTAGE
public static final MeasurementUnit VOLTAGE
-
POWER
public static final MeasurementUnit POWER
-
ENERGY
public static final MeasurementUnit ENERGY
-
HUMIDITY
public static final MeasurementUnit HUMIDITY
-
-
Method Detail
-
values
public static MeasurementUnit[] 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 (MeasurementUnit c : MeasurementUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MeasurementUnit 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
-
getUnit
public java.lang.String getUnit()
-
getPrescision
public java.lang.Number getPrescision()
-
getMapper
public java.lang.Class<?> getMapper()
-
getMatchingMeasurementUnit
public static MeasurementUnit getMatchingMeasurementUnit(java.lang.Class<?> caller)
-
-