Class Severity


  • public final class Severity
    extends Object
    This enumeration class defines the possible severity levels of user messages.
    See Also:
    UserMessage
    • Field Detail

      • FATAL

        public static final Severity FATAL
        Specifies a "fatal" error, the highest severity.
      • ERROR

        public static final Severity ERROR
        Specifies an error.
      • WARNING

        public static final Severity WARNING
        Specifies a warning.
      • INFO

        public static final Severity INFO
        Specifies an information message, the lowest severity.
    • Method Detail

      • getLabel

        public String getLabel()
      • toParsableString

        public String toParsableString()
        Returns a flag identifying the severity. The returned string can be converted back into a Severity instance using method parseFlag(String).
      • isFatal

        public boolean isFatal()
      • isError

        public boolean isError()
      • isWarning

        public boolean isWarning()
      • isInfo

        public boolean isInfo()
      • isEqualOrMoreSevereThan

        public boolean isEqualOrMoreSevereThan​(Severity anotherSeverity)
        Returns true if this severity level is equal to or higher than the one specified.

        The order of severity levels is as follows:

        FATAL > ERROR > WARNING > INFO
      • getAllSeveritiesWithLabel

        public static Map<Severity,​UserMessage> getAllSeveritiesWithLabel()
        Returns a map from the available severities to their corresponding user message.