@NotThreadSafe public class ResourceErrorGroup extends Object implements IResourceErrorGroup, ICloneable<ResourceErrorGroup>, IClearable
| Constructor and Description |
|---|
ResourceErrorGroup() |
ResourceErrorGroup(IResourceError... aResourceErrors) |
ResourceErrorGroup(IResourceError aResourceError) |
ResourceErrorGroup(Iterable<? extends IResourceError> aResourceErrors) |
| Modifier and Type | Method and Description |
|---|---|
ResourceErrorGroup |
addResourceError(IResourceError aResourceError)
Add a new resource error item.
|
ResourceErrorGroup |
addResourceErrorGroup(IResourceErrorGroup aResourceErrorGroup)
Add a all resource errors of the other group
|
ResourceErrorGroup |
addResourceErrors(IResourceError... aResourceErrors)
Add multiple resource error items.
|
ResourceErrorGroup |
addResourceErrors(Iterable<? extends IResourceError> aResourceErrors)
Add multiple resource error items.
|
EChange |
clear()
Reset the contents of the element to the after-construction state.
|
boolean |
containsAtLeastOneError()
Check if this group contains at least one error or fatal error message.
|
boolean |
containsAtLeastOneFailure()
Check if this group contains at least one failure message.
|
boolean |
containsAtLeastOneSuccess()
Check if this group contains at least one success message.
|
boolean |
containsNoError()
Check if this group contains no error or fatal error message.
|
boolean |
containsNoFailure()
Check if this group contains no failure message.
|
boolean |
containsNoSuccess()
Check if this group contains no success message.
|
boolean |
containsOnlyError()
Check if this group contains only error or fatal error messages.
|
boolean |
containsOnlyFailure()
Check if this group contains only failure messages.
|
boolean |
containsOnlySuccess()
Check if this group contains only success messages.
|
boolean |
equals(Object o) |
ResourceErrorGroup |
getAllErrors()
Get a resource error group containing only the error elements.
|
ResourceErrorGroup |
getAllFailures()
Get a resource error group containing only the failure elements.
|
List<IResourceError> |
getAllResourceErrors()
Get a list of all contained resource errors.
|
ResourceErrorGroup |
getClone() |
int |
getErrorCount() |
int |
getFailureCount() |
IErrorLevel |
getMostSevereErrorLevel()
Get the most severe error level within this object.
|
int |
getSize() |
int |
getSuccessCount() |
int |
hashCode() |
boolean |
isEmpty() |
Iterator<IResourceError> |
iterator() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ResourceErrorGroup()
public ResourceErrorGroup(@Nonnull IResourceError aResourceError)
public ResourceErrorGroup(@Nonnull IResourceError... aResourceErrors)
public ResourceErrorGroup(@Nonnull Iterable<? extends IResourceError> aResourceErrors)
@Nonnull public ResourceErrorGroup addResourceError(@Nonnull IResourceError aResourceError)
aResourceError - The resource error to be added. May not be null.@Nonnull public ResourceErrorGroup addResourceErrors(@Nonnull IResourceError... aResourceErrors)
aResourceErrors - The resource errors to be added. May not be null.@Nonnull public ResourceErrorGroup addResourceErrors(@Nonnull Iterable<? extends IResourceError> aResourceErrors)
aResourceErrors - The resource errors to be added. May not be null.@Nonnull public ResourceErrorGroup addResourceErrorGroup(@Nonnull IResourceErrorGroup aResourceErrorGroup)
aResourceErrorGroup - The resource error group to be added. May not be null.public boolean containsOnlySuccess()
IHasErrorLevelsfalse is returned, since no success message is contained. If
you want to check, if the list is empty or contains only success messages,
use IHasErrorLevels.containsNoFailure() instead.containsOnlySuccess in interface IHasErrorLevelstrue if at least one item is present, and if all items
have the error level success, false otherwise.IHasErrorLevels.containsNoFailure()public boolean containsAtLeastOneSuccess()
IHasErrorLevelscontainsAtLeastOneSuccess in interface IHasErrorLevelstrue if at least one success item is present,
false otherwise.public boolean containsNoSuccess()
IHasErrorLevelscontainsNoSuccess in interface IHasErrorLevelstrue if no success item is present, false
otherwise.@Nonnegative public int getSuccessCount()
getSuccessCount in interface IHasErrorLevelspublic boolean containsOnlyFailure()
IHasErrorLevelsfalse is returned. All error levels except
EErrorLevel.SUCCESS are considered to be a failure!containsOnlyFailure in interface IHasErrorLevelstrue if at least one item is present, and if all items
have an error level indicating failure, false
otherwise.public boolean containsAtLeastOneFailure()
IHasErrorLevelsEErrorLevel.SUCCESS are considered to be a failure!containsAtLeastOneFailure in interface IHasErrorLevelstrue if at least one failure item is present,
false otherwise.public boolean containsNoFailure()
IHasErrorLevelsEErrorLevel.SUCCESS are considered to be a failure!containsNoFailure in interface IHasErrorLevelstrue if no failure item is present, false
otherwise.@Nonnegative public int getFailureCount()
getFailureCount in interface IHasErrorLevelspublic boolean containsOnlyError()
IHasErrorLevelsfalse is returned. All error levels ≥
EErrorLevel.ERROR are considered to be an error!containsOnlyError in interface IHasErrorLevelstrue if at least one item is present, and if all items
have an error level indicating error or fatal error,
false otherwise.public boolean containsAtLeastOneError()
IHasErrorLevelsEErrorLevel.ERROR are considered to be an error!containsAtLeastOneError in interface IHasErrorLevelstrue if at least one error or fatal error item is
present, false otherwise.public boolean containsNoError()
IHasErrorLevelsEErrorLevel.ERROR are considered to be an error!containsNoError in interface IHasErrorLevelstrue if no error or fatal error item is present,
false otherwise.@Nonnegative public int getErrorCount()
getErrorCount in interface IHasErrorLevelsEErrorLevel.ERROR are considered to be an
error!@Nonnull @ReturnsMutableCopy public ResourceErrorGroup getAllFailures()
IResourceErrorGroupEErrorLevel.SUCCESS are considered to be a failure!getAllFailures in interface IResourceErrorGroup@Nonnull @ReturnsMutableCopy public ResourceErrorGroup getAllErrors()
IResourceErrorGroupEErrorLevel.ERROR are considered to be an error!getAllErrors in interface IResourceErrorGroup@Nonnull public IErrorLevel getMostSevereErrorLevel()
IHasErrorLevelsEErrorLevel's severity model.getMostSevereErrorLevel in interface IHasErrorLevelsEErrorLevel.SUCCESS if no resource error is contained, the
most severe contained error level otherwise.@Nonnegative public int getSize()
public boolean isEmpty()
isEmpty in interface IHasSizetrue if no items are present, false if at
least a single item is present.IHasSize.getSize()@Nonnull @ReturnsMutableCopy public ResourceErrorGroup getClone()
getClone in interface ICloneable<ResourceErrorGroup>@Nonnull public Iterator<IResourceError> iterator()
iterator in interface Iterable<IResourceError>@Nonnull @ReturnsMutableCopy public List<IResourceError> getAllResourceErrors()
IResourceErrorGroupgetAllResourceErrors in interface IResourceErrorGroupnull list of all contained error objects@Nonnull public EChange clear()
IClearableclear in interface IClearableEChange.CHANGED if at least one element was cleared,
EChange.UNCHANGED otherwise.Copyright © 2014–2016 Philip Helger. All rights reserved.