private void applyAndAnimateAdditions(List<T> from,List<T> newItems){
  hashItems=new HashSet<>(from);
  int in=0;
  for (int i=0; i < newItems.size(); i++) {
    if (mFilterAsyncTask != null && mFilterAsyncTask.isCancelled())     return;
    final T item=newItems.get(i);
    if (!hashItems.contains(item)) {
      if (notifyMoveOfFilteredItems) {
        from.add(item);
        notifications.add(new Notification(from.size(),Notification.ADD));
      }
 else {
        from.add(i,item);
        notifications.add(new Notification(i,Notification.ADD));
      }
      in++;
    }
  }
  hashItems=null;
  if (DEBUG)   Log.v(TAG,"calculateAdditions total new=" + in);
}

private void applyAndAnimateAdditions ( List < T > from , List < T > newItems ) { hashItems = new HashSet < > ( from ) ; int in = 0 ; for ( int i = 0 ; i < newItems . size ( ) ; i ++ ) { if ( mFilterAsyncTask != null && mFilterAsyncTask . isCancelled ( ) ) return ; final T item = newItems . get ( i ) ; if ( ! hashItems . contains ( item ) ) { if ( notifyMoveOfFilteredItems ) { from . add ( item ) ; notifications . add ( new Notification ( from . size ( ) , Notification . ADD ) ) ; } else { from . add ( i , item ) ; notifications . add ( new Notification ( i , Notification . ADD ) ) ; } in ++ ; } } hashItems = null ; if ( DEBUG ) Log . v ( TAG , "calculateAdditions total new=" + in ) ; }
find out all added items and animate them .
