public FluentFuture<Optional<T>> deleteFirst() {
      checkState(numberToSkip == 0, "Cannot use .skip() with .deleteFirst()");
      FindOneAndDeleteOptions options = new FindOneAndDeleteOptions();
      options.sort(convertToBson(ordering));
      return repository.doFindOneAndDelete(criteria, options);
    }
Deletes and returns first matching document. Returns {@link Optional#absent()} if none
documents matches.
@return future of optional matching deleted document.
mongo/src/org/immutables/mongo/repository/Repositories.java