public void restore(@NonNull RemovedElement element){
  int position=0;
  if (element.getElementBefore() != null) {
    position=items.indexOf(element.getElementBefore());
    if (position == -1) {
      Log.w(TAG,"Could not restore element, index not found - " + element.getElement());
      return;
    }
    ++position;
  }
  items.add(position,element.getElement());
  notifyItemInserted(position + stickyItems.size());
}

public void restore ( @ NonNull RemovedElement element ) { int position = 0 ; if ( element . getElementBefore ( ) != null ) { position = items . indexOf ( element . getElementBefore ( ) ) ; if ( position == - 1 ) { Log . w ( TAG , "Could not restore element, index not found - " + element . getElement ( ) ) ; return ; } ++ position ; } items . add ( position , element . getElement ( ) ) ; notifyItemInserted ( position + stickyItems . size ( ) ) ; }
restore a previously removed item .
