public enum EErrorLevel extends Enum<EErrorLevel> implements IHasID<String>, ISuccessIndicator, IErrorIndicator, ISeverityComparable<EErrorLevel>
| 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 EErrorLevel |
getMostSevere(EErrorLevel eLevel1,
EErrorLevel eLevel2) |
int |
getNumericLevel() |
boolean |
isEqualSevereThan(EErrorLevel eErrorLevel)
Check if this object is of the same level (= equal important) than the
passed object.
|
boolean |
isError() |
boolean |
isFailure() |
boolean |
isLessOrEqualSevereThan(EErrorLevel eErrorLevel)
Check if this object is of equal or lower level (= equally or less
important) than the passed object.
|
boolean |
isLessSevereThan(EErrorLevel eErrorLevel)
Check if this object is of lower level (= less important) than the passed
object.
|
boolean |
isMoreOrEqualSevereThan(EErrorLevel eErrorLevel)
Check if this object is of equal or higher level (= equally or more
important) than the passed object.
|
boolean |
isMoreSevereThan(EErrorLevel eErrorLevel)
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()
public boolean isEqualSevereThan(@Nonnull EErrorLevel eErrorLevel)
ISeverityComparableisEqualSevereThan in interface ISeverityComparable<EErrorLevel>eErrorLevel - The object to compare to.true if this object is equally important than the
passed object!public boolean isLessSevereThan(@Nonnull EErrorLevel eErrorLevel)
ISeverityComparableisLessSevereThan in interface ISeverityComparable<EErrorLevel>eErrorLevel - The object to compare to.true if this object is less important than the passed
object!public boolean isLessOrEqualSevereThan(@Nonnull EErrorLevel eErrorLevel)
ISeverityComparableisLessOrEqualSevereThan in interface ISeverityComparable<EErrorLevel>eErrorLevel - The object to compare to.true if this object is equally or less important than
the passed object!public boolean isMoreSevereThan(@Nonnull EErrorLevel eErrorLevel)
ISeverityComparableisMoreSevereThan in interface ISeverityComparable<EErrorLevel>eErrorLevel - The object to compare to.true if this object is more important than the passed
object!public boolean isMoreOrEqualSevereThan(@Nonnull EErrorLevel eErrorLevel)
ISeverityComparableisMoreOrEqualSevereThan in interface ISeverityComparable<EErrorLevel>eErrorLevel - The object to compare to.true if this object is equally or more important than
the passed object!@Nullable public static EErrorLevel getMostSevere(@Nullable EErrorLevel eLevel1, @Nullable EErrorLevel 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 © 2006–2015 phloc systems. All rights reserved.