public void sort(boolean ascending){
  if (filter == null) {
    filterImpl("");
  }
  Integer[] filterArray=new Integer[filter.size()];
  Integer[] tempArray=new Integer[filter.size()];
  for (int iter=0; iter < filter.size(); iter++) {
    filterArray[iter]=filter.get(iter);
  }
  System.arraycopy(filterArray,0,tempArray,0,filterArray.length);
  mergeSort(filterArray,tempArray,0,filterArray.length,0,ascending);
  for (int iter=0; iter < filter.size(); iter++) {
    filter.set(iter,tempArray[iter]);
  }
  dataChanged(DataChangedListener.CHANGED,-1);
}

public void sort ( boolean ascending ) { if ( filter == null ) { filterImpl ( "" ) ; } Integer [ ] filterArray = new Integer [ filter . size ( ) ] ; Integer [ ] tempArray = new Integer [ filter . size ( ) ] ; for ( int iter = 0 ; iter < filter . size ( ) ; iter ++ ) { filterArray [ iter ] = filter . get ( iter ) ; } System . arraycopy ( filterArray , 0 , tempArray , 0 , filterArray . length ) ; mergeSort ( filterArray , tempArray , 0 , filterArray . length , 0 , ascending ) ; for ( int iter = 0 ; iter < filter . size ( ) ; iter ++ ) { filter . set ( iter , tempArray [ iter ] ) ; } dataChanged ( DataChangedListener . CHANGED , - 1 ) ; }
this method performs a sort of the list , to determine the sort order this class should be derived and the compare ( ) method should be overriden
