docs: @SuppressWarnings("ConstantConditions")
      public void swap(@Nullable final List<T> newObjects) {
          if (newObjects == null) {
              clear();
          } else {
              synchronized (mLock) {
                  final DiffUtil.DiffResult result = DiffUtil.calculateDiff(new DiffUtil.Callback() {
                      @Override
                      public boolean areContentsTheSame(final int oldItemPosition,
                                                        final int newItemPosition) {
                          final T oldItem = mObjects.get(oldItemPosition);
                          final T newItem = newObjects.get(newItemPosition);
                          return isContentTheSame(oldItem, newItem);
                      }
  
                      @Override
                      public boolean areItemsTheSame(final int oldItemPosition,
                                                     final int newItemPosition) {
                          final T oldItem = mObjects.get(oldItemPosition);
                          final T newItem = newObjects.get(newItemPosition);
                          return isItemTheSame(oldItem, newItem);
                      }
  
                      @Override
                      public int getNewListSize() {
                          return newObjects.size();
                      }
  
                      @Override
                      public int getOldListSize() {
                          return mObjects.size();
                      }
                  });
                  mObjects.clear();
                  mObjects.addAll(newObjects);
                  result.dispatchUpdatesTo(this);
              }
          }
      }