@Immutable public class ResourceError extends Object implements IResourceError
IResourceError interface. The
implementation is immutable.| Constructor and Description |
|---|
ResourceError(IResourceLocation aLocation,
IErrorLevel aErrorLevel,
IHasDisplayText aErrorText) |
ResourceError(IResourceLocation aLocation,
IErrorLevel aErrorLevel,
IHasDisplayText aErrorText,
Throwable aLinkedException) |
ResourceError(IResourceLocation aLocation,
IErrorLevel aErrorLevel,
String sErrorText) |
ResourceError(IResourceLocation aLocation,
IErrorLevel aErrorLevel,
String sErrorText,
Throwable aLinkedException) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getAsString(Locale aDisplayLocale)
Get the error as a string representation, including error ID, error
location, error text and the linked exception.
|
String |
getDisplayText(Locale aContentLocale) |
IErrorLevel |
getErrorLevel() |
Throwable |
getLinkedException() |
IResourceLocation |
getLocation() |
int |
hashCode() |
boolean |
isEqualSevereThan(IResourceError aOther)
Check if this object is of the same level (= equal important) than the
passed object.
|
boolean |
isError() |
boolean |
isFailure() |
boolean |
isLessOrEqualSevereThan(IResourceError aOther)
Check if this object is of equal or lower level (= equally or less
important) than the passed object.
|
boolean |
isLessSevereThan(IResourceError aOther)
Check if this object is of lower level (= less important) than the passed
object.
|
boolean |
isMoreOrEqualSevereThan(IResourceError aOther)
Check if this object is of equal or higher level (= equally or more
important) than the passed object.
|
boolean |
isMoreSevereThan(IResourceError aOther)
Check if this object is of higher level (= more important) than the passed
object.
|
boolean |
isNoError() |
boolean |
isSuccess() |
String |
toString() |
public ResourceError(@Nonnull IResourceLocation aLocation, @Nonnull IErrorLevel aErrorLevel, @Nonnull String sErrorText)
public ResourceError(@Nonnull IResourceLocation aLocation, @Nonnull IErrorLevel aErrorLevel, @Nonnull String sErrorText, @Nullable Throwable aLinkedException)
public ResourceError(@Nonnull IResourceLocation aLocation, @Nonnull IErrorLevel aErrorLevel, @Nonnull IHasDisplayText aErrorText)
public ResourceError(@Nonnull IResourceLocation aLocation, @Nonnull IErrorLevel aErrorLevel, @Nonnull IHasDisplayText aErrorText, @Nullable Throwable aLinkedException)
@Nonnull public final IResourceLocation getLocation()
getLocation in interface IResourceErrornull location of the error.@Nonnull public final IErrorLevel getErrorLevel()
getErrorLevel in interface IHasErrorLevelnull.@Nullable @OverrideOnDemand public String getDisplayText(@Nonnull Locale aContentLocale)
getDisplayText in interface IHasDisplayTextaContentLocale - The locale to be used for resolving. May not be null.null if the text could not be resolved in the passed
locale.@Nullable public final Throwable getLinkedException()
getLinkedException in interface IResourceErrornull if no such exception is
available.@Nonnull @OverrideOnDemand public String getAsString(@Nonnull Locale aDisplayLocale)
IResourceErrorgetAsString in interface IResourceErroraDisplayLocale - Locale to resolve the error textpublic 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 IResourceError aOther)
ISeverityComparableisEqualSevereThan in interface ISeverityComparable<IResourceError>aOther - The object to compare to.true if this object is equally important than the
passed object!public boolean isLessSevereThan(@Nonnull IResourceError aOther)
ISeverityComparableisLessSevereThan in interface ISeverityComparable<IResourceError>aOther - The object to compare to.true if this object is less important than the passed
object!public boolean isLessOrEqualSevereThan(@Nonnull IResourceError aOther)
ISeverityComparableisLessOrEqualSevereThan in interface ISeverityComparable<IResourceError>aOther - The object to compare to.true if this object is equally or less important than
the passed object!public boolean isMoreSevereThan(@Nonnull IResourceError aOther)
ISeverityComparableisMoreSevereThan in interface ISeverityComparable<IResourceError>aOther - The object to compare to.true if this object is more important than the passed
object!public boolean isMoreOrEqualSevereThan(@Nonnull IResourceError aOther)
ISeverityComparableisMoreOrEqualSevereThan in interface ISeverityComparable<IResourceError>aOther - The object to compare to.true if this object is equally or more important than
the passed object!Copyright © 2014–2016 Philip Helger. All rights reserved.