org.jboss.dashboard.commons.message
Class MessageList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Message>
org.jboss.dashboard.commons.message.MessageList
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<Message>, Collection<Message>, List<Message>, RandomAccess
public class MessageList
- extends ArrayList<Message>
A list of messages.
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
MessageList
public MessageList()
MessageList
public MessageList(Collection<Message> c)
getCreationDate
public Date getCreationDate()
addAll
public boolean addAll(Collection<Message> c,
boolean discardDuplicates)
getMessagesWithCode
public List<Message> getMessagesWithCode(String messageCode)
- Retrieves from the list of messages those elements that produces the specified message code.
- Parameters:
messageCode - The message code.
- Returns:
- A list of Message instances.
getMessagesForElement
public List<Message> getMessagesForElement(Object element)
- Retrieves from the list of messages those elements that produces the specified message code.
- Parameters:
element - The process element.
- Returns:
- A list of Message instances.
hasErrors
public boolean hasErrors()
containsMessagesOfType
public boolean containsMessagesOfType(int type)
removeMessagesOfType
public void removeMessagesOfType(int type)
keepOnlyMessagesOfType
public void keepOnlyMessagesOfType(int type)
getMessagesOfType
public List<Message> getMessagesOfType(int type)
getMessagesOfTypeForElement
public String[] getMessagesOfTypeForElement(Object element,
int type)
- Method that looks up the messages of the specified type for the specified element, and returns them in a String[].
If the element is null, or no messages were found, null is returned
Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.