code: public void sort(@NonNull Comparator<? super T> comparator) {
          final ArrayList<T> copy = new ArrayList<>(mObjects);
          Collections.sort(copy, comparator);
          swap(copy);
      }
docs: Sorts the content of this adapter using the specified comparator.
  
  @param comparator The comparator used to sort the objects contained in this adapter.