// Comparator to sort in natural ascending order
public class Natural implements Comparator
   {
   /**
    * Natural Comparator, uses Comparable.
    * Defines an alternate sort order for Comparable without JDK 1.5+ generics.
    * Compare two Comparable Objects.
    * Compares .
    * Informally, returns (a-b), or +ve if a is more positive than b.
    *
    * @param a first Comparable to compare
    * @param b second Comparable to compare
    *
    * @return +ve if a>b, 0 if a==b, -ve if a<b
    */
   public final int compare( Object a, Object b )
      {
      return( ( Comparable ) a ).compareTo( ( ( Comparable ) b ) );
      }
   }