Enum Unit

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Unit>

    public enum Unit
    extends java.lang.Enum<Unit>
    • Enum Constant Detail

      • NONE

        public static final Unit NONE
        No Unit
      • PERCENT

        public static final Unit PERCENT
        Percentage [%], 0-100
      • THOUSANDTH

        public static final Unit THOUSANDTH
        Thousandth [‰], 0-1000
      • ON_OFF

        public static final Unit ON_OFF
        On or Off
      • WATT

        public static final Unit WATT
        Unit of Active Power [W]
      • MILLIWATT

        public static final Unit MILLIWATT
        Unit of Active Power [mW]
      • KILOWATT

        public static final Unit KILOWATT
        Unit of Active Power [kW]
      • VOLT_AMPERE_REACTIVE

        public static final Unit VOLT_AMPERE_REACTIVE
        Unit of Reactive Power [var]
      • KILOVOLT_AMPERE_REACTIVE

        public static final Unit KILOVOLT_AMPERE_REACTIVE
        Unit of Reactive Power [kvar]
      • VOLT_AMPERE

        public static final Unit VOLT_AMPERE
        Unit of Apparent Power [VA]
      • KILOVOLT_AMPERE

        public static final Unit KILOVOLT_AMPERE
        Unit of Apparent Power [kVA]
      • VOLT

        public static final Unit VOLT
        Unit of Voltage [V]
      • MILLIVOLT

        public static final Unit MILLIVOLT
        Unit of Voltage [mV]
      • AMPERE

        public static final Unit AMPERE
        Unit of Current [A]
      • MILLIAMPERE

        public static final Unit MILLIAMPERE
        Unit of Current [mA]
      • AMPERE_HOURS

        public static final Unit AMPERE_HOURS
        Unit of Electric Charge
      • MILLIAMPERE_HOURS

        public static final Unit MILLIAMPERE_HOURS
        Unit of Electric Charge
      • KILOAMPERE_HOURS

        public static final Unit KILOAMPERE_HOURS
        Unit of Electric Charge
      • WATT_HOURS

        public static final Unit WATT_HOURS
        Unit of Energy [Wh]
      • KILOWATT_HOURS

        public static final Unit KILOWATT_HOURS
        Unit of Energy [kWh]
      • VOLT_AMPERE_REACTIVE_HOURS

        public static final Unit VOLT_AMPERE_REACTIVE_HOURS
        Unit of Reactive Energy [varh]
      • KILOVOLT_AMPERE_REACTIVE_HOURS

        public static final Unit KILOVOLT_AMPERE_REACTIVE_HOURS
        Unit of Reactive Energy [kVArh]
      • WATT_HOURS_BY_WATT_PEAK

        public static final Unit WATT_HOURS_BY_WATT_PEAK
        Unit of Energy [Wh/Wp]
      • VOLT_AMPERE_HOURS

        public static final Unit VOLT_AMPERE_HOURS
        Unit of Apparent Energy [VAh]
      • HERTZ

        public static final Unit HERTZ
        Unit of Frequency [Hz]
      • MILLIHERTZ

        public static final Unit MILLIHERTZ
        Unit of Frequency [mHz]
      • DEGREE_CELSIUS

        public static final Unit DEGREE_CELSIUS
        Unit of Temperature [C]
      • DEZIDEGREE_CELSIUS

        public static final Unit DEZIDEGREE_CELSIUS
        Unit of Temperature [dC]
      • SECONDS

        public static final Unit SECONDS
        Unit of Time [s]
      • MILLISECONDS

        public static final Unit MILLISECONDS
        Unit of Time [ms]
      • MINUTE

        public static final Unit MINUTE
        Unit of Time
      • HOUR

        public static final Unit HOUR
        Unit of Time
      • CUMULATED_SECONDS

        public static final Unit CUMULATED_SECONDS
        Unit of cumulated time [s]
      • OHM

        public static final Unit OHM
        Unit of Resistance [Ohm]
      • KILOOHM

        public static final Unit KILOOHM
        Unit of Resistance [kOhm]
      • MILLIOHM

        public static final Unit MILLIOHM
        Unit of Resistance [mOhm]
      • MICROOHM

        public static final Unit MICROOHM
        Unit of Resistance [uOhm]
    • Method Detail

      • values

        public static Unit[] 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 (Unit c : Unit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Unit 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 name
        java.lang.NullPointerException - if the argument is null
      • getBaseUnit

        public Unit getBaseUnit()
      • getAsBaseUnit

        public int getAsBaseUnit​(int value)
      • getSymbol

        public java.lang.String getSymbol()
      • format

        public java.lang.String format​(java.lang.Object value,
                                       OpenemsType type)
      • formatAsBaseUnit

        public java.lang.String formatAsBaseUnit​(java.lang.Object value,
                                                 OpenemsType type)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<Unit>