Package io.openems.common.channel
Enum Class Level
- All Implemented Interfaces:
OptionsEnum
,Serializable
,Comparable<Level>
,Constable
Severity/visibility Level.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription"Fault" indicates, that there is at least one fault message available."Info" indicates, that everything is OK, but there is at least one informative messages available."OK" indicates, that everything is OK and there are no messages."Warning" indicates, that there is at least one warning message available. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.google.gson.JsonElement element) Gets the Level from a JsonElement.Gets the Level from a JsonObject.fromValue
(int value) Gets the Level from an integer value.getName()
Gets this enums String representation.Gets the enum that is used for 'UNDEFINED' values.int
getValue()
Gets this enums int representation.boolean
Is this Level at least as high as the other Level.static Level
Returns the enum constant of this class with the specified name.static Level[]
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
-
OK
"OK" indicates, that everything is OK and there are no messages. -
INFO
"Info" indicates, that everything is OK, but there is at least one informative messages available. -
WARNING
"Warning" indicates, that there is at least one warning message available. -
FAULT
"Fault" indicates, that there is at least one fault message available.
-
-
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
-
getUndefined
Description copied from interface:OptionsEnum
Gets the enum that is used for 'UNDEFINED' values.- Specified by:
getUndefined
in interfaceOptionsEnum
- Returns:
- the UNDEFINED enum
-
isAtLeast
Is this Level at least as high as the other Level.- Parameters:
level
- the other level- Returns:
- true if it as at least as high
-
fromValue
Gets the Level from an integer value.- Parameters:
value
- the integer value- Returns:
- the Level
-
fromJson
Gets the Level from a JsonObject.- Parameters:
element
- the JsonObjectmemberName
- the name of the member of the JsonObject- Returns:
- the Level
-
fromJson
Gets the Level from a JsonElement.- Parameters:
element
- the JsonElement- Returns:
- the Level
-