Package com.helger.commons.error.level
Interface IHasErrorLevel
-
- All Superinterfaces:
IErrorIndicator,ISuccessIndicator
- All Known Subinterfaces:
IError,IHasErrorLevelComparable<IMPLTYPE>
- All Known Implementing Classes:
LoggingExceptionCallback,LogMessage,SingleError
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IHasErrorLevel extends ISuccessIndicator, IErrorIndicator
Interface representing an object having an error level.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IErrorLevelgetErrorLevel()default booleanhasErrorLevel(IErrorLevel aErrorLevel)Check if this object has the provided error level.default booleanisError()default booleanisFailure()default booleanisNoError()default booleanisSuccess()-
Methods inherited from interface com.helger.commons.state.ISuccessIndicator
and, or
-
-
-
-
Method Detail
-
getErrorLevel
@Nonnull IErrorLevel getErrorLevel()
- Returns:
- The error level of this object. May not be
null.
-
hasErrorLevel
default boolean hasErrorLevel(@Nullable IErrorLevel aErrorLevel)
Check if this object has the provided error level.- Parameters:
aErrorLevel- The error level to check. May benull.- Returns:
trueifgetErrorLevel()and the passed error level are equal,falseotherwise.
-
isSuccess
default boolean isSuccess()
- Specified by:
isSuccessin interfaceISuccessIndicator- Returns:
trueon success andfalseon failure.
-
isFailure
default boolean isFailure()
- Specified by:
isFailurein interfaceISuccessIndicator- Returns:
trueon failure andfalseon success.
-
isError
default boolean isError()
- Specified by:
isErrorin interfaceIErrorIndicator- Returns:
trueif this level is at leastEErrorLevel.ERRORor worse.
-
isNoError
default boolean isNoError()
- Specified by:
isNoErrorin interfaceIErrorIndicator- Returns:
trueif this level is belowEErrorLevel.ERROR.
-
-