/** Class SortFilter
 *
 * Takes a set of rules and applies them to message lists
 *
 * Some of the get and set methods may not be needed, but we are including them for now.  The
 * unneeded ones will be deleted during the implementation phase.
 * 
 * @author Chris Kern
 * @author Erin Nichols
 * @author Joe Simonson
 * @version 0.20 of Oct 1999
 */

public interface SortFilter {

 
    /*+-----------+
     *|  Methods  |
     *+-----------+
     */
    
    /** Extract the list of rules. */
    public Rule[] getSortBy();

    /** Set the list of rules. */
    public void setSortBy(Rule[] newRules);

    /** Purpose       - Return the list of rules as a string
     * Parameters     - none
     * Preconditions  - none
     * Postconditions - No fields are changed.
     * Produces       - A string containing all of the rules to sort by.
     * Problems       - none
     */

    public String toString();

    /** Purpose       - Returns a sorted messagelist, given an unsorted message list, by the rule set
     *                  sortBy
     * Parameters     - A MessageInfoList.
     * Preconditions  - listOfMessages is a valid MessageInfoList.
     * Postconditions - No fields are altered.
     * Produces       - A list of messages sorted according to the rule set.
     * Problems       - none
     */

    public MessageInfoListStub sort(MessageInfoListStub listOfMessage);

} // Class SortFilter

