public interface VectorSort { /** * A method that sorts Vector v by placing the elements of v in ascending order according * to the rules of Comparator c. Runtime is 0(logn). * * @pre * All elements of v should be accepted as parameters of c.compare. * @post * for(int i = 1; i < v.size; i++) c.compare(v[i-1],v[i]) == -1 or 0 * @result will be a permutation of v. * @exception * EmptyVectorException is thrown when v.size == 0. * IncomparableObjectsException is thrown when elements of v are not accepted as parameters of c. */ public Vector sort(Vector v) throws EmptyVectorException, IncomparableObjectsException; }//VectorSort interface