@Immutable public class SingleError extends Object implements IError
IError.
| Constructor and Description |
|---|
SingleError(IErrorLevel aErrorLevel,
String sErrorText) |
SingleError(IErrorLevel aErrorLevel,
String sErrorFieldName,
String sErrorText) |
SingleError(String sErrorID,
IErrorLevel aErrorLevel,
String sErrorFieldName,
String sErrorText) |
| Modifier and Type | Method and Description |
|---|---|
static SingleError |
createError(String sErrorText) |
static SingleError |
createError(String sErrorFieldName,
String sErrorText) |
static SingleError |
createError(String sErrorID,
String sErrorFieldName,
String sErrorText) |
static SingleError |
createInfo(String sErrorText) |
static SingleError |
createInfo(String sErrorFieldName,
String sErrorText) |
static SingleError |
createInfo(String sErrorID,
String sErrorFieldName,
String sErrorText) |
static SingleError |
createSuccess(String sErrorText) |
static SingleError |
createSuccess(String sErrorFieldName,
String sErrorText) |
static SingleError |
createSuccess(String sErrorID,
String sErrorFieldName,
String sErrorText) |
static SingleError |
createWarning(String sErrorText) |
static SingleError |
createWarning(String sErrorFieldName,
String sErrorText) |
static SingleError |
createWarning(String sErrorID,
String sErrorFieldName,
String sErrorText) |
boolean |
equals(Object o) |
String |
getErrorFieldName() |
String |
getErrorID() |
IErrorLevel |
getErrorLevel() |
String |
getErrorText() |
IResourceLocation |
getResourceLocation() |
boolean |
hasErrorFieldName() |
boolean |
hasErrorID() |
int |
hashCode() |
boolean |
isEqualSevereThan(IError aOther)
Check if this object is of the same level (= equal important) than the
passed object.
|
boolean |
isError() |
boolean |
isFailure() |
boolean |
isLessOrEqualSevereThan(IError aOther)
Check if this object is of equal or lower level (= equally or less
important) than the passed object.
|
boolean |
isLessSevereThan(IError aOther)
Check if this object is of lower level (= less important) than the passed
object.
|
boolean |
isMoreOrEqualSevereThan(IError aOther)
Check if this object is of equal or higher level (= equally or more
important) than the passed object.
|
boolean |
isMoreSevereThan(IError aOther)
Check if this object is of higher level (= more important) than the passed
object.
|
boolean |
isNoError() |
boolean |
isSuccess() |
String |
toString() |
public SingleError(@Nonnull IErrorLevel aErrorLevel, @Nonnull @Nonempty String sErrorText)
public SingleError(@Nonnull IErrorLevel aErrorLevel, @Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nullable public String getErrorID()
getErrorID in interface IHasErrorIDnull.public boolean hasErrorID()
hasErrorID in interface IHasErrorIDtrue if an error ID is present, false
otherwise@Nonnull public IErrorLevel getErrorLevel()
getErrorLevel in interface IHasErrorLevelnull.@Nullable public String getErrorFieldName()
getErrorFieldName in interface IErrornull.public boolean hasErrorFieldName()
hasErrorFieldName in interface IErrortrue if a field name is present, false
otherwise@Nullable public IResourceLocation getResourceLocation()
getResourceLocation in interface IErrorIResourceLocation
. If no error field name is present, null is returned,
else an IResourceLocation with the field name set is
returned.@Nonnull public String getErrorText()
getErrorText in interface IErrornull nor empty.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 this level is at least
EErrorLevel.ERROR or worse.public boolean isNoError()
isNoError in interface IErrorIndicatortrue if this level is below
EErrorLevel.ERROR.public boolean isEqualSevereThan(@Nonnull IError aOther)
ISeverityComparableisEqualSevereThan in interface ISeverityComparable<IError>aOther - The object to compare to.true if this object is equally important than the
passed object!public boolean isLessSevereThan(@Nonnull IError aOther)
ISeverityComparableisLessSevereThan in interface ISeverityComparable<IError>aOther - The object to compare to.true if this object is less important than the passed
object!public boolean isLessOrEqualSevereThan(@Nonnull IError aOther)
ISeverityComparableisLessOrEqualSevereThan in interface ISeverityComparable<IError>aOther - The object to compare to.true if this object is equally or less important than
the passed object!public boolean isMoreSevereThan(@Nonnull IError aOther)
ISeverityComparableisMoreSevereThan in interface ISeverityComparable<IError>aOther - The object to compare to.true if this object is more important than the passed
object!public boolean isMoreOrEqualSevereThan(@Nonnull IError aOther)
ISeverityComparableisMoreOrEqualSevereThan in interface ISeverityComparable<IError>aOther - The object to compare to.true if this object is equally or more important than
the passed object!@Nonnull public static SingleError createSuccess(@Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createSuccess(@Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createSuccess(@Nullable String sErrorID, @Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createInfo(@Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createInfo(@Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createInfo(@Nullable String sErrorID, @Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createWarning(@Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createWarning(@Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createWarning(@Nullable String sErrorID, @Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createError(@Nonnull @Nonempty String sErrorText)
@Nonnull public static SingleError createError(@Nullable String sErrorFieldName, @Nonnull @Nonempty String sErrorText)
Copyright © 2014–2016 Philip Helger. All rights reserved.