public void sort(Comparator<? super T> comparator){
  Collections.sort(mObjects,comparator);
  notifyItemRangeChanged(0,getItemCount());
}

public void sort ( Comparator < ? super T > comparator ) { Collections . sort ( mObjects , comparator ) ; notifyItemRangeChanged ( 0 , getItemCount ( ) ) ; }
sorts the content of this adapter using the specified comparator .
