Class WarningCollection

java.lang.Object
com.atlassian.jira.rest.api.util.WarningCollection
All Implemented Interfaces:
Serializable

public class WarningCollection extends Object implements Serializable
A JAXB representation of an WarningCollection useful for returning via JSON or XML.
Since:
v8.4
See Also:
  • Method Details

    • of

      @Nonnull public static WarningCollection of(@Nonnull String... messages)
      Returns a new WarningCollection containing a list of warning messages.
      Parameters:
      messages - an array of Strings containing warning messages
      Returns:
      a new WarningCollection
    • of

      @Nonnull public static WarningCollection of(@Nonnull Collection<String> messages)
      Returns a new WarningCollection containing a list of warning messages.
      Parameters:
      messages - an Iterable of Strings containing warning messages
      Returns:
      a new WarningCollection
    • of

      @Nonnull public static WarningCollection of(@Nonnull WarningCollection warningCollection)
      Returns a new WarningCollection containing all the warnings contained in the input warning collection.
      Parameters:
      warningCollection - a WarningCollection
      Returns:
      a new WarningCollection
    • addWarningCollection

      @Nonnull public WarningCollection addWarningCollection(@Nonnull WarningCollection warningCollection)
      Adds all the warning messages that are in the given warning collection to this warning collection.
      Parameters:
      warningCollection - a WarningCollection
      Returns:
      this
    • addWarningCollection

      @Nonnull public WarningCollection addWarningCollection(@Nonnull WarningCollection warningCollection)
      Adds all the warning messages that are in the given warning collection to this warning collection.
      Parameters:
      warningCollection - a WarningCollection
      Returns:
      this
    • addWarningMessage

      @Nonnull public WarningCollection addWarningMessage(@Nonnull String warningMessage)
      Adds the given warning message to this warning collection.
      Parameters:
      warningMessage - a String containing a warning message
      Returns:
      this
    • addWarningMessages

      @Nonnull public WarningCollection addWarningMessages(@Nonnull Collection<String> messages)
      Adds the given warning messages to this warning collection.
      Parameters:
      messages - a collection of Strings containing warning messages
      Returns:
      this
    • getWarningMessages

      @Nonnull public Collection<String> getWarningMessages()
    • hasAnyWarnings

      public boolean hasAnyWarnings()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object