public Comparable<?>[] toArray(Comparable<?>[] data){
  if (data == null) {
    data=new Comparable<?>[size()];
  }
  if (data.length != size()) {
    throw new IllegalArgumentException(MessageFormat.format("Array of size {0,number,integer} does not match {1,number,integer} elements.",data.length,size()));
  }
  for (int i=0; i < data.length; i++) {
    data[i]=get(i);
  }
  return data;
}

public Comparable < ? > [ ] toArray ( Comparable < ? > [ ] data ) { if ( data == null ) { data = new Comparable < ? > [ size ( ) ] ; } if ( data . length != size ( ) ) { throw new IllegalArgumentException ( MessageFormat . format ( "Array of size {0,number,integer} does not match {1,number,integer} elements." , data . length , size ( ) ) ) ; } for ( int i = 0 ; i < data . length ; i ++ ) { data [ i ] = get ( i ) ; } return data ; }
converts the data column to an array .
