Package io.openems.edge.evcs.api
Enum Class Phases
- All Implemented Interfaces:
OptionsEnum
,Serializable
,Comparable<Phases>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getFromThreePhase
(int threePhaseValue) Get value converted from a three phase value.getName()
Gets this enums String representation.Gets the enum that is used for 'UNDEFINED' values.int
getValue()
Gets this enums int representation.static Phases
Returns the enum constant of this class with the specified name.static Phases[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface io.openems.common.types.OptionsEnum
asCamelCase, isUndefined
-
Enum Constant Details
-
ONE_PHASE
-
TWO_PHASE
-
THREE_PHASE
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getValue
public int getValue()Description copied from interface:OptionsEnum
Gets this enums int representation.- Specified by:
getValue
in interfaceOptionsEnum
- Returns:
- the int representation
-
getName
Description copied from interface:OptionsEnum
Gets this enums String representation.- Specified by:
getName
in interfaceOptionsEnum
- Returns:
- the String representation
-
getFromThreePhase
public int getFromThreePhase(int threePhaseValue) Get value converted from a three phase value.As the values e.g. hardware limit are most likely given for three phase charging, this is used to convert the value, depending on the current phases
- Parameters:
threePhaseValue
- value using all three phases as power- Returns:
- converted value
-
getUndefined
Description copied from interface:OptionsEnum
Gets the enum that is used for 'UNDEFINED' values.- Specified by:
getUndefined
in interfaceOptionsEnum
- Returns:
- the UNDEFINED enum
-