public class Messages extends Object implements Cloneable, Serializable
| Constructor and Description |
|---|
Messages()
Creates a new
Messages instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(Message message)
Adds a message to the collection.
|
void |
addMessages(Message[] messages)
Adds an array of messages to the collection.
|
void |
addMessages(Messages messages)
Adds messages to the collection.
|
void |
clear()
Removes all messages from the collection.
|
Object |
clone()
Creates and returns a deep copy of this object.
|
Message |
getMessage(int index)
Accessor to an indexed message.
|
Message[] |
getMessages()
Getter for property
messages. |
Messages |
getMessages(Class type)
Accessor to messages of a given type.
|
void |
removeMessage(Message message)
Removes a message from the collection.
|
Messages |
removeMessages(Class type)
Removes messages of a given type.
|
void |
removeMessages(Messages messages)
Removes messages from the collection.
|
int |
size()
Getter for property
size. |
public Messages()
Messages instance.public void addMessage(Message message)
message - the message to add to the collection.NullPointerException - if message is null.public final void addMessages(Message[] messages)
messages - array of messages to add to the collection.NullPointerException - if messages is null or
contains null elements.public final void addMessages(Messages messages)
messages - collection of messages to add to the collection.NullPointerException - if messages is null.public void clear()
public final Message getMessage(int index)
index - the index of the message to return.index.IndexOutOfBoundsException - if index is negativ,
greater than or equal to size().public Message[] getMessages()
messages.public final Messages getMessages(Class type)
type - the type of the messages to return.type.NullPointerException - if type is null.public void removeMessage(Message message)
message - the message to remove from the collection.NullPointerException - if message is null.public final Messages removeMessages(Class type)
type - the type of the messages to remove.type removed from the
collection.NullPointerException - if type is null.public final void removeMessages(Messages messages)
messages - collection of messages to remove from the collection.NullPointerException - if messages is null.public final int size()
size.Copyright © 2005-2012 jDTAUS. All Rights Reserved.