import Comparator;
import IncomparableException;

/**
 * Things that you can tell to sort themselves.
 */
public interface Sortable {
  /**
   * Sort the contents of the thing using a comparator
   * to compare elements.
   * Pre: The elements can be compared.
   * Post: The elements are sorted.  Each element is no greater
   *   the the next element.
   * Post: No elements are added or deleted.
   *
   * @exception IncomparableException
   *   if there are pairs of elements that cannot be compared.
   */
  public void sort(Comparator compare)
    throws IncomparableException;
} // Sortable()
