import java.util.Comparator;

/**
 * An ordering that compares stuff by their own comparable method.
 * Probably has a good chance of violating some rule of comparators,
 * or the folks at Sun would have included it already.
 *
 * @author Samuel A. Rebelsky
 * @version 1.0 of October 2000
 */
public class CompareComparable 
  implements Comparator
{
  public int compare(Object first, Object second) {
    return ((Comparable) first).compareTo(second);
  } // compareTo(Object, Object)
} // class CompareComparable

