Enum Severity
- All Implemented Interfaces:
Serializable, Comparable<Severity>, java.lang.constant.Constable
Severity values used by the Syslog system.
| Numerical Code | Severity |
|---|---|
| 0 | Emergency: system is unusable |
| 1 | Alert: action must be taken immediately |
| 2 | Critical: critical conditions |
| 3 | Error: error conditions |
| 4 | Warning: warning conditions |
| 5 | Notice: normal but significant condition |
| 6 | Informational: informational messages |
| 7 | Debug: debug-level messages |
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()Returns the severity code.static SeveritygetSeverity(Level level) Returns the Severity for the specified Level.booleanDetermine if the name matches this Severity.static SeverityReturns the enum constant of this type with the specified name.static Severity[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EMERG
System is unusable. -
ALERT
Action must be taken immediately. -
CRITICAL
Critical conditions. -
ERROR
Error conditions. -
WARNING
Warning conditions. -
NOTICE
Normal but significant conditions. -
INFO
Informational messages. -
DEBUG
Debug level messages.
-
-
Field Details
-
code
private final int code
-
-
Constructor Details
-
Severity
private Severity(int code)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getCode
public int getCode()Returns the severity code.- Returns:
- The numeric value associated with the Severity.
-
isEqual
Determine if the name matches this Severity.- Parameters:
name- the name to match.- Returns:
- true if the name matches, false otherwise.
-
getSeverity
-