public int[] toUnsortedModelIndices(int[] sortedSelectedIndices){
  int[] unsortedSelectedIndices=new int[sortedSelectedIndices.length];
  int x=0;
  for (  int sortedIndex : sortedSelectedIndices) {
    unsortedSelectedIndices[x++]=toUnsortedModelIndex(sortedIndex);
  }
  Arrays.sort(unsortedSelectedIndices);
  return unsortedSelectedIndices;
}

public int [ ] toUnsortedModelIndices ( int [ ] sortedSelectedIndices ) { int [ ] unsortedSelectedIndices = new int [ sortedSelectedIndices . length ] ; int x = 0 ; for ( int sortedIndex : sortedSelectedIndices ) { unsortedSelectedIndices [ x ++ ] = toUnsortedModelIndex ( sortedIndex ) ; } Arrays . sort ( unsortedSelectedIndices ) ; return unsortedSelectedIndices ; }
convert an array of sorted model indices to their unsorted model indices . sort the resulting set of indices .
