import IncomparableException;

/**
 * Objects used to compare other objects.  Based on version 1.2 
 * of the old Comparable.java by Sam Rebelsky.
 *
 * @author Samuel A. Rebelsky
 * @version 1.0 of October 2000
 */
public interface Ordering {
  /**
   * Determine if the first element should precede the
   * second.   Throws an exception if the two elements cannot
   * be compared.
   */
  public boolean precedes(Object first, Object second)
    throws IncomparableException;

  /** 
   * Determine if the first element is equal to the second.   Throws
   * an exception if the two elements cannot be compared.
   */
  public boolean equals(Object first, Object second)
    throws IncomparableException;
  
} // interface Ordering

