public interface IsWarningSet<M> extends IsMessageSet
Interface for objects that have a set of warning messages.
| Modifier and Type | Method and Description |
|---|---|
default void |
addAllWarnings(Collection<M> warnings)
Adds all warnings from given collection.
|
default void |
addWarning(M warning)
Adds a new warning.
|
default void |
clearWarningMessages()
Clears all warnings.
|
static <M> IsWarningSet<M> |
create()
Creates a new warning set.
|
Set<M> |
getWarningMessages()
Returns the warning set.
|
default boolean |
hasWarnings()
Tests if warnings have been added.
|
default boolean |
isErrorSet()
Tests if the message set is an error set.
|
default boolean |
isWarningSet()
Tests if the message set is an warning set.
|
default String |
render()
Renders the warning set.
|
isInfoSetdefault boolean isErrorSet()
IsMessageSetTests if the message set is an error set.
isErrorSet in interface IsMessageSetdefault boolean isWarningSet()
IsMessageSetTests if the message set is an warning set.
isWarningSet in interface IsMessageSetdefault void clearWarningMessages()
Clears all warnings.
Set<M> getWarningMessages()
Returns the warning set.
default void addWarning(M warning)
Adds a new warning.
warning - warning to adddefault void addAllWarnings(Collection<M> warnings)
Adds all warnings from given collection.
warnings - collection of warnings to adddefault boolean hasWarnings()
Tests if warnings have been added.
default String render()
Renders the warning set.
The method uses DoesRender or simple toString to render warnings.
Each element in the warning set is rendered in a single line.
render in interface DoesRenderstatic <M> IsWarningSet<M> create()
Creates a new warning set.
M - type of the messages in the setCopyright © 2016–2017. All rights reserved.