/** Class MessageInfoList
 *
 * Represents a list of messages that can be passed to the sort
 * procedures.
 *
 * @author Chris Kern
 * @author Erin Nichols
 * @author Joe Simonson
 * @version 0.20 of Oct 1999
 */

public interface MessageInfoList {


    /*+---------------+
     *|    Methods    |
     *+---------------+
     */

    /** Extract the original array */
    public MailMessage[] getMessageList();

    /** Input an entirely new set of messages */
    public void setMessageList(MailMessage[] setter);

    /** Purpose       - Returns the array of mail messages as a single string
     * Parameters     - none
     * Preconditions  - none
     * Postconditions - none
     * Produces       - A string
     * Problems       - none
     */
    public String toString();

    /** Purpose       - Swaps two messages in the list.
     * Parameters     - none
     * Preconditions  - Two positive integers.
     * Postconditions - The messages have been swaped.
     * Produces       - none
     * Problems       - The integers could be too large or out of the range.
     */

    public void swap(int pos1, int pos2);
    

    /** Purpose       - Insert a message at a given point in the list
     * Parameters     - 1. The mail message to insert
     *                  2. The position
     * Preconditions  - Valid Mailmessage, valid integer that is within the range
     * Postconditions - The message is inserted at the point
     * Produces       - nothing
     * Problems       - The integers could be too large or out of the range.
     */
    public void insertMessage(MailMessage toInsert, int position);

}// class MessageInfoList

