public interface IsErrorSet<M> extends IsMessageSet
Interface for objects that have a set of error messages.
| Modifier and Type | Method and Description |
|---|---|
default void |
addAllErrors(Collection<M> errors)
Adds all errors from given collection.
|
default void |
addError(M error)
Adds a new error.
|
default void |
clearErrorMessages()
Clears all errors.
|
static <M> IsErrorSet<M> |
create()
Creates a new error set.
|
Set<M> |
getErrorMessages()
Returns the error set.
|
default boolean |
hasErrors()
Tests if errors have been added.
|
default String |
render()
Renders the error set.
|
isErrorSet, isInfoSet, isWarningSetdefault void clearErrorMessages()
Clears all errors.
Set<M> getErrorMessages()
Returns the error set.
default void addError(M error)
Adds a new error.
error - error to adddefault void addAllErrors(Collection<M> errors)
Adds all errors from given collection.
errors - collection of errors to adddefault boolean hasErrors()
Tests if errors have been added.
default String render()
Renders the error set.
The method uses DoesRender or simple toString to render errors.
Each element in the error set is rendered in a single line.
render in interface DoesRenderstatic <M> IsErrorSet<M> create()
Creates a new error set.
M - type of the messages in the setCopyright © 2016–2017. All rights reserved.