Enum EErrorLevel

java.lang.Object
java.lang.Enum<EErrorLevel>
com.helger.commons.error.level.EErrorLevel
All Implemented Interfaces:
IErrorLevel, IHasID<String>, ISeverityComparable<IErrorLevel>, IErrorIndicator, ISuccessIndicator, Serializable, Comparable<EErrorLevel>, java.lang.constant.Constable

public enum EErrorLevel extends Enum<EErrorLevel> implements IErrorLevel
Represents a generic error level.
Author:
Philip Helger
  • Enum Constant Details

    • SUCCESS

      public static final EErrorLevel SUCCESS
      Success
    • INFO

      public static final EErrorLevel INFO
      Information level
    • WARN

      public static final EErrorLevel WARN
      Warning level.
    • ERROR

      public static final EErrorLevel ERROR
      Error level
    • FATAL_ERROR

      public static final EErrorLevel FATAL_ERROR
      Fatal error
  • Field Details

    • LOWEST

      public static final EErrorLevel LOWEST
      Lowest error level within this enum
    • HIGHEST

      public static final EErrorLevel HIGHEST
      Highest error level within this enum
  • Method Details

    • values

      public static EErrorLevel[] 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

      public static EErrorLevel valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getID

      @Nonnull @Nonempty public String getID()
      Description copied from interface: IHasID
      Get the unique ID of this object. If the type is String than the returned value must match an XML NMToken expression (so e.g. no ':' in the ID)!
      Specified by:
      getID in interface IHasID<String>
      Returns:
      The ID of this object. May not be null.
    • getNumericLevel

      @Nonnegative public int getNumericLevel()
      Specified by:
      getNumericLevel in interface IErrorLevel
      Returns:
      The numeric level of this error level. Must be ≥ 0. The higher the numeric level, the higher the priority of the error level. So e.g. ERROR has a higher/larger/greater numerical level than WARNING.
    • getFromIDOrNull

      @Nullable public static EErrorLevel getFromIDOrNull(@Nullable String sID)
    • getFromIDOrThrow

      @Nonnull public static EErrorLevel getFromIDOrThrow(@Nullable String sID)
    • getFromIDOrDefault

      @Nullable public static EErrorLevel getFromIDOrDefault(@Nullable String sID, @Nullable EErrorLevel eDefault)
    • getFromIDCaseInsensitiveOrNull

      @Nullable public static EErrorLevel getFromIDCaseInsensitiveOrNull(@Nullable String sID)
    • getFromIDCaseInsensitiveOrThrow

      @Nonnull public static EErrorLevel getFromIDCaseInsensitiveOrThrow(@Nullable String sID)
    • getFromIDCaseInsensitiveOrDefault

      @Nullable public static EErrorLevel getFromIDCaseInsensitiveOrDefault(@Nullable String sID, @Nullable EErrorLevel eDefault)