public void addAll(@NonNull List<T> itemList){
synchronized (lock) {
    if (items == null) {
      items=new ArrayList<>();
    }
    items.addAll(itemList);
  }
  if (notifyOnChange) {
    if (items.size() - itemList.size() != 0) {
      notifyItemRangeChanged(items.size() - itemList.size(),itemList.size());
    }
 else {
      notifyDataSetChanged();
    }
  }
}

public void addAll ( @ NonNull List < T > itemList ) { synchronized ( lock ) { if ( items == null ) { items = new ArrayList < > ( ) ; } items . addAll ( itemList ) ; } if ( notifyOnChange ) { if ( items . size ( ) - itemList . size ( ) != 0 ) { notifyItemRangeChanged ( items . size ( ) - itemList . size ( ) , itemList . size ( ) ) ; } else { notifyDataSetChanged ( ) ; } } }
adds all the specified items to the list
