public enum EErrorLevel extends Enum<EErrorLevel> implements IErrorLevel
| Enum Constant and Description |
|---|
ERROR
Error level
|
FATAL_ERROR
Fatal error
|
INFO
Information level
|
SUCCESS
Success
|
WARN
Warning level.
|
| Modifier and Type | Field and Description |
|---|---|
static EErrorLevel |
HIGHEST
Highest error level within this enum
|
static EErrorLevel |
LOWEST
Lowest error level within this enum
|
| Modifier and Type | Method and Description |
|---|---|
static EErrorLevel |
getFromIDCaseInsensitiveOrDefault(String sID,
EErrorLevel eDefault) |
static EErrorLevel |
getFromIDCaseInsensitiveOrNull(String sID) |
static EErrorLevel |
getFromIDCaseInsensitiveOrThrow(String sID) |
static EErrorLevel |
getFromIDOrDefault(String sID,
EErrorLevel eDefault) |
static EErrorLevel |
getFromIDOrNull(String sID) |
static EErrorLevel |
getFromIDOrThrow(String sID) |
String |
getID()
Get the unique ID of this object.
|
static IErrorLevel |
getMostSevere(IErrorLevel eLevel1,
IErrorLevel eLevel2) |
int |
getNumericLevel() |
boolean |
isEqualSevereThan(IErrorLevel aErrorLevel)
Check if this object is of the same level (= equal important) than the
passed object.
|
boolean |
isError() |
boolean |
isFailure() |
boolean |
isLessOrEqualSevereThan(IErrorLevel aErrorLevel)
Check if this object is of equal or lower level (= equally or less
important) than the passed object.
|
boolean |
isLessSevereThan(IErrorLevel aErrorLevel)
Check if this object is of lower level (= less important) than the passed
object.
|
boolean |
isMoreOrEqualSevereThan(IErrorLevel aErrorLevel)
Check if this object is of equal or higher level (= equally or more
important) than the passed object.
|
boolean |
isMoreSevereThan(IErrorLevel aErrorLevel)
Check if this object is of higher level (= more important) than the passed
object.
|
boolean |
isNoError() |
boolean |
isSuccess() |
static EErrorLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EErrorLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EErrorLevel SUCCESS
public static final EErrorLevel INFO
public static final EErrorLevel WARN
public static final EErrorLevel ERROR
public static final EErrorLevel FATAL_ERROR
public static final EErrorLevel LOWEST
public static final EErrorLevel HIGHEST
public static EErrorLevel[] values()
for (EErrorLevel c : EErrorLevel.values()) System.out.println(c);
public static EErrorLevel valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nonnull @Nonempty public String getID()
IHasIDString than the
returned value must match an XML NMToken expression (so e.g. no ':' in the
ID)!public boolean isSuccess()
isSuccess in interface ISuccessIndicatortrue on success and false on failure.public boolean isFailure()
isFailure in interface ISuccessIndicatortrue on failure and false on success.public boolean isError()
isError in interface IErrorIndicatortrue if the severity of this item is ≥ than
ERROR.public boolean isNoError()
isNoError in interface IErrorIndicatortrue if the severity of this item is < than
ERROR.@Nonnegative public int getNumericLevel()
getNumericLevel in interface IErrorLevelpublic boolean isEqualSevereThan(@Nonnull IErrorLevel aErrorLevel)
ISeverityComparableisEqualSevereThan in interface ISeverityComparable<IErrorLevel>aErrorLevel - The object to compare to.true if this object is equally important than the
passed object!public boolean isLessSevereThan(@Nonnull IErrorLevel aErrorLevel)
ISeverityComparableisLessSevereThan in interface ISeverityComparable<IErrorLevel>aErrorLevel - The object to compare to.true if this object is less important than the passed
object!public boolean isLessOrEqualSevereThan(@Nonnull IErrorLevel aErrorLevel)
ISeverityComparableisLessOrEqualSevereThan in interface ISeverityComparable<IErrorLevel>aErrorLevel - The object to compare to.true if this object is equally or less important than
the passed object!public boolean isMoreSevereThan(@Nonnull IErrorLevel aErrorLevel)
ISeverityComparableisMoreSevereThan in interface ISeverityComparable<IErrorLevel>aErrorLevel - The object to compare to.true if this object is more important than the passed
object!public boolean isMoreOrEqualSevereThan(@Nonnull IErrorLevel aErrorLevel)
ISeverityComparableisMoreOrEqualSevereThan in interface ISeverityComparable<IErrorLevel>aErrorLevel - The object to compare to.true if this object is equally or more important than
the passed object!@Nullable public static IErrorLevel getMostSevere(@Nullable IErrorLevel eLevel1, @Nullable IErrorLevel eLevel2)
@Nullable public static EErrorLevel getFromIDOrNull(@Nullable String sID)
@Nonnull public static EErrorLevel getFromIDOrThrow(@Nullable String sID)
@Nullable public static EErrorLevel getFromIDOrDefault(@Nullable String sID, @Nullable EErrorLevel eDefault)
@Nullable public static EErrorLevel getFromIDCaseInsensitiveOrNull(@Nullable String sID)
@Nonnull public static EErrorLevel getFromIDCaseInsensitiveOrThrow(@Nullable String sID)
@Nullable public static EErrorLevel getFromIDCaseInsensitiveOrDefault(@Nullable String sID, @Nullable EErrorLevel eDefault)
Copyright © 2014–2015 Philip Helger. All rights reserved.