org.jdtaus.core.text
Class Messages

java.lang.Object
  extended byorg.jdtaus.core.text.Messages
All Implemented Interfaces:
Cloneable, Serializable

public class Messages
extends Object
implements Cloneable, Serializable

Collection of messages.

Version:
$Id: Messages.java 1914 2007-03-01 02:20:44Z schulte2005 $
Author:
Christian Schulte
See Also:
Serialized Form

Constructor Summary
Messages()
           
 
Method Summary
 void addMessage(Message message)
          Adds a message 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 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 .
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
Method Detail

addMessage

public void addMessage(Message message)
Adds a message to the collection.

Parameters:
message - the message to add to the collection.
Throws:
NullPointerException - if is .

addMessages

public final void addMessages(Messages messages)
Adds messages to the collection.

Parameters:
messages - collection of messages to add to the collection.
Throws:
NullPointerException - if is .

clear

public void clear()
Removes all messages from the collection.


clone

public Object clone()
Creates and returns a deep copy of this object.

Returns:
a clone of this instance.

getMessage

public final Message getMessage(int index)
Accessor to an indexed message.

Parameters:
index - the index of the message to return.
Returns:
a reference to the message at .
Throws:
IndexOutOfBoundsException - if is negativ, greater than or equal to .

getMessages

public Message[] getMessages()
Getter for property .

Returns:
messages held by the collection.

getMessages

public final Messages getMessages(Class type)
Accessor to messages of a given type.

Parameters:
type - the type of the messages to return.
Returns:
a collection of messages of type .
Throws:
NullPointerException - if is .

removeMessage

public void removeMessage(Message message)
Removes a message from the collection.

Parameters:
message - the message to remove from the collection.
Throws:
NullPointerException - if is .

removeMessages

public final Messages removeMessages(Class type)
Removes messages of a given type.

Parameters:
type - the type of the messages to remove.
Returns:
the collection of messages of type removed from the collection.
Throws:
NullPointerException - if is .

removeMessages

public final void removeMessages(Messages messages)
Removes messages from the collection.

Parameters:
messages - collection of messages to remove from the collection.
Throws:
NullPointerException - if is .

size

public final int size()
Getter for property .

Returns:
the number of elements in this collection.


Copyright © 2005-2007 jDTAUS. All Rights Reserved.