private void moveRowsBasedOnPriority ( ) { for ( RowNumber myNumber : overs . keySet ( ) ) { Over over = overs . get ( myNumber ) ; int newIndex = rowOrder . indexOf ( new RowNumber ( over . getOver ( ) ) ) ; rowOrder . remove ( myNumber ) ; rowOrder . add ( newIndex , myNumber ) ; } }
Move rows on top of the row it has priority over .