com.ibm.commons.iloader.node.validators.support
Class Messages

java.lang.Object
  extended by com.ibm.commons.iloader.node.validators.support.Messages

public class Messages
extends java.lang.Object

A bundle of Messages that may be displayed to the end user.


Constructor Summary
Messages()
          Creates a new instance of this class.
 
Method Summary
 void add(int severity, java.lang.String message)
          Creates a new message with the given severity and adds it to the bundle.
 void add(Message message)
          Adds a Message object to the bundle.
 Message get(int index)
          Retuns the Message at the given index.
 int size()
          Returns the number of messages stored in this bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Messages

public Messages()
Creates a new instance of this class.

Method Detail

size

public int size()
Returns the number of messages stored in this bundle.

Returns:
returns a positive integer (may be zero!)

get

public Message get(int index)
Retuns the Message at the given index.

Parameters:
index - the index of the desired message
Returns:
the message at the given index
Throws:
java.lang.IndexOutOfBoundsException - if index is out of range (index < 0 || index >= size()).

add

public void add(Message message)
Adds a Message object to the bundle.

Parameters:
message -

add

public void add(int severity,
                java.lang.String message)
Creates a new message with the given severity and adds it to the bundle.

Parameters:
severity -
message -