Enum Class MeasurementUnit

java.lang.Object
java.lang.Enum<MeasurementUnit>
com.github.kaklakariada.fritzbox.model.homeautomation.MeasurementUnit
All Implemented Interfaces:
Serializable, Comparable<MeasurementUnit>, Constable

public enum MeasurementUnit extends 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
Sample: The Voltage is measured in 'V' (Volt) and has a precision of '0.001'. The number 237123 provided by the statistics must be multiplied by the precision which gives us 237.123 V.
  • Enum Constant Details

  • Method Details

    • values

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

      public static MeasurementUnit valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getUnit

      public String getUnit()
    • getPrescision

      public Number getPrescision()
    • getMapper

      public Class<?> getMapper()
    • getMatchingMeasurementUnit

      public static MeasurementUnit getMatchingMeasurementUnit(Class<?> caller)