Interface IErrorLevel

All Superinterfaces:
IErrorIndicator, IHasID<String>, ISeverityComparable<IErrorLevel>, ISuccessIndicator
All Known Implementing Classes:
EErrorLevel, ErrorLevel

Interface representing a single error level.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    compareTo(IErrorLevel aErrorLevel)
     
     
    int
     
    default boolean
    isEQ(IErrorLevel aErrorLevel)
    Check if this object is of the same level (= equal important) than the passed object.
    default boolean
     
    default boolean
     
    default boolean
    isGE(IErrorLevel aErrorLevel)
    Check if this object is of equal or higher level (= equally or more important) than the passed object.
    default boolean
    isGT(IErrorLevel aErrorLevel)
    Check if this object is of higher level (= more important) than the passed object.
    default boolean
     
    default boolean
    isLE(IErrorLevel aErrorLevel)
    Check if this object is of equal or lower level (= equally or less important) than the passed object.
    default boolean
    isLT(IErrorLevel aErrorLevel)
    Check if this object is of lower level (= less important) than the passed object.
    default boolean
    isNE(IErrorLevel aErrorLevel)
    Check if this object is of a different level (= different importance) than the passed object.
    default boolean
     
    default boolean
     

    Methods inherited from interface com.helger.commons.id.IHasID

    getID

    Methods inherited from interface com.helger.commons.state.ISuccessIndicator

    and, or
  • Method Details

    • getNumericLevel

      @Nonnegative int getNumericLevel()
      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.
    • isSuccess

      default boolean isSuccess()
      Specified by:
      isSuccess in interface ISuccessIndicator
      Returns:
      true on success and false on failure.
    • isFailure

      default boolean isFailure()
      Specified by:
      isFailure in interface ISuccessIndicator
      Returns:
      true on failure and false on success.
    • isError

      default boolean isError()
      Specified by:
      isError in interface IErrorIndicator
      Returns:
      true if this level is at least EErrorLevel.ERROR or worse.
    • isNoError

      default boolean isNoError()
      Specified by:
      isNoError in interface IErrorIndicator
      Returns:
      true if this level is below EErrorLevel.ERROR.
    • compareTo

      default int compareTo(@Nonnull IErrorLevel aErrorLevel)
    • isEQ

      default boolean isEQ(@Nonnull IErrorLevel aErrorLevel)
      Description copied from interface: ISeverityComparable
      Check if this object is of the same level (= equal important) than the passed object.
      Specified by:
      isEQ in interface ISeverityComparable<IErrorLevel>
      Parameters:
      aErrorLevel - The object to compare to.
      Returns:
      true if this object is equally important than the passed object!
    • isNE

      default boolean isNE(@Nonnull IErrorLevel aErrorLevel)
      Description copied from interface: ISeverityComparable
      Check if this object is of a different level (= different importance) than the passed object.
      Specified by:
      isNE in interface ISeverityComparable<IErrorLevel>
      Parameters:
      aErrorLevel - The object to compare to.
      Returns:
      true if this object is not equally important than the passed object!
    • isLT

      default boolean isLT(@Nonnull IErrorLevel aErrorLevel)
      Description copied from interface: ISeverityComparable
      Check if this object is of lower level (= less important) than the passed object.
      Specified by:
      isLT in interface ISeverityComparable<IErrorLevel>
      Parameters:
      aErrorLevel - The object to compare to.
      Returns:
      true if this object is less important than the passed object!
    • isLE

      default boolean isLE(@Nonnull IErrorLevel aErrorLevel)
      Description copied from interface: ISeverityComparable
      Check if this object is of equal or lower level (= equally or less important) than the passed object.
      Specified by:
      isLE in interface ISeverityComparable<IErrorLevel>
      Parameters:
      aErrorLevel - The object to compare to.
      Returns:
      true if this object is equally or less important than the passed object!
    • isGT

      default boolean isGT(@Nonnull IErrorLevel aErrorLevel)
      Description copied from interface: ISeverityComparable
      Check if this object is of higher level (= more important) than the passed object.
      Specified by:
      isGT in interface ISeverityComparable<IErrorLevel>
      Parameters:
      aErrorLevel - The object to compare to.
      Returns:
      true if this object is more important than the passed object!
    • isGE

      default boolean isGE(@Nonnull IErrorLevel aErrorLevel)
      Description copied from interface: ISeverityComparable
      Check if this object is of equal or higher level (= equally or more important) than the passed object.
      Specified by:
      isGE in interface ISeverityComparable<IErrorLevel>
      Parameters:
      aErrorLevel - The object to compare to.
      Returns:
      true if this object is equally or more important than the passed object!
    • isHighest

      default boolean isHighest()
    • getMostSevere

      @Nullable static IErrorLevel getMostSevere(@Nullable IErrorLevel aLevel1, @Nullable IErrorLevel aLevel2)