@Immutable public class ErrorLevel extends Object implements IErrorLevel
IErrorLevel interface.| Constructor and Description |
|---|
ErrorLevel(String sID,
int nNumericLevel) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getID()
Get the unique ID of this object.
|
int |
getNumericLevel() |
int |
hashCode() |
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() |
String |
toString() |
public ErrorLevel(@Nonnull@Nonempty String sID, @Nonnegative int nNumericLevel)
@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
EErrorLevel.ERROR.public boolean isNoError()
isNoError in interface IErrorIndicatortrue if the severity of this item is < than
EErrorLevel.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!Copyright © 2014–2015 Philip Helger. All rights reserved.