@SuppressWarnings("unused") public final void selectAll(){
  for (int i=0; i < realmResults.size(); i++)   selectedPositions.add(i);
  notifyDataSetChanged();
}

@ SuppressWarnings ( "unused" ) public final void selectAll ( ) { for ( int i = 0 ; i < realmResults . size ( ) ; i ++ ) selectedPositions . add ( i ) ; notifyDataSetChanged ( ) ; }
select all of the items in the list .
