public boolean moveUp(int firstRow,int lastRow){
  lastRow=Math.min(lastRow,getNumberRows());
  if (firstRow <= 0 || firstRow > lastRow)   return false;
 else {
    List<Integer>[] array=new List[getNumberRows()];
    for (int i=0; i < getNumberRows(); i++)     array[i]=getCompressedRow2Reads(i);
    List<Integer> replaced=array[firstRow - 1];
    System.arraycopy(array,firstRow,array,firstRow - 1,lastRow + 1 - firstRow);
    array[lastRow]=replaced;
    compressedRow2Reads.clear();
    compressedRow2Reads.addAll(Arrays.asList(array));
    return true;
  }
}

public boolean moveUp ( int firstRow , int lastRow ) { lastRow = Math . min ( lastRow , getNumberRows ( ) ) ; if ( firstRow <= 0 || firstRow > lastRow ) return false ; else { List < Integer > [ ] array = new List [ getNumberRows ( ) ] ; for ( int i = 0 ; i < getNumberRows ( ) ; i ++ ) array [ i ] = getCompressedRow2Reads ( i ) ; List < Integer > replaced = array [ firstRow - 1 ] ; System . arraycopy ( array , firstRow , array , firstRow - 1 , lastRow + 1 - firstRow ) ; array [ lastRow ] = replaced ; compressedRow2Reads . clear ( ) ; compressedRow2Reads . addAll ( Arrays . asList ( array ) ) ; return true ; } }
move selected rows up
