public void sort(Comparator<FragmentData> comparator){
  checkTransaction();
  saveOldOrder();
  if (comparator == null) {
    Collections.sort(mFragmentDatas);
  }
 else {
    Collections.sort(this.mFragmentDatas,comparator);
  }
  checkPositionChange();
}

public void sort ( Comparator < FragmentData > comparator ) { checkTransaction ( ) ; saveOldOrder ( ) ; if ( comparator == null ) { Collections . sort ( mFragmentDatas ) ; } else { Collections . sort ( this . mFragmentDatas , comparator ) ; } checkPositionChange ( ) ; }
sort the fragment with the target comparator ,
