public class WarningCollection extends Object implements Serializable
WarningCollection
useful for returning via JSON or XML.Modifier and Type | Method and Description |
---|---|
WarningCollection |
addWarningCollection(WarningCollection warningCollection)
Adds all the warning messages that are in the given warning collection to this warning collection.
|
WarningCollection |
addWarningCollection(WarningCollection warningCollection)
Adds all the warning messages that are in the given warning collection to this warning collection.
|
WarningCollection |
addWarningMessage(String warningMessage)
Adds the given warning message to this warning collection.
|
WarningCollection |
addWarningMessages(Collection<String> messages)
Adds the given warning messages to this warning collection.
|
boolean |
equals(Object o) |
Collection<String> |
getWarningMessages() |
boolean |
hasAnyWarnings() |
int |
hashCode() |
static WarningCollection |
of(Collection<String> messages)
Returns a new
WarningCollection containing a list of warning messages. |
static WarningCollection |
of(String... messages)
Returns a new
WarningCollection containing a list of warning messages. |
static WarningCollection |
of(WarningCollection warningCollection)
Returns a new
WarningCollection containing all the warnings contained in the input warning collection. |
String |
toString() |
@Nonnull public static WarningCollection of(@Nonnull String... messages)
WarningCollection
containing a list of warning messages.messages
- an array of Strings containing warning messagesWarningCollection
@Nonnull public static WarningCollection of(@Nonnull Collection<String> messages)
WarningCollection
containing a list of warning messages.messages
- an Iterable of Strings containing warning messagesWarningCollection
@Nonnull public static WarningCollection of(@Nonnull WarningCollection warningCollection)
WarningCollection
containing all the warnings contained in the input warning collection.warningCollection
- a WarningCollection
WarningCollection
@Nonnull public WarningCollection addWarningCollection(@Nonnull WarningCollection warningCollection)
warningCollection
- a WarningCollection
@Nonnull public WarningCollection addWarningCollection(@Nonnull WarningCollection warningCollection)
warningCollection
- a WarningCollection
@Nonnull public WarningCollection addWarningMessage(@Nonnull String warningMessage)
warningMessage
- a String containing a warning message@Nonnull public WarningCollection addWarningMessages(@Nonnull Collection<String> messages)
messages
- a collection of Strings containing warning messages@Nonnull public Collection<String> getWarningMessages()
public boolean hasAnyWarnings()
Copyright © 2002-2019 Atlassian. All Rights Reserved.