public static void sort(AbstractList array){
  Object temp;
  int j, n=array.size();
  for (j=n / 2; j > 0; j--) {
    adjust(array,j,n);
  }
  for (j=n - 1; j > 0; j--) {
    temp=array.get(0);
    array.set(0,array.get(j));
    array.set(j,temp);
    adjust(array,1,j);
  }
}

public static void sort ( AbstractList array ) { Object temp ; int j , n = array . size ( ) ; for ( j = n / 2 ; j > 0 ; j -- ) { adjust ( array , j , n ) ; } for ( j = n - 1 ; j > 0 ; j -- ) { temp = array . get ( 0 ) ; array . set ( 0 , array . get ( j ) ) ; array . set ( j , temp ) ; adjust ( array , 1 , j ) ; } }
sorts a vector of comparable objects into increasing order .
