code: public static OffsetPaginationLinks create(
        OffsetPaginatedList<?> list, UriInfo uriInfo) {
      // Find offset and limit by inspecting the list metadata, if that's not provided then fall back
      // to inspecting the UriInfo.
      Long offset =
          list.metadata().offset() != null ? list.metadata().offset()
              : currentOffset(uriInfo, list.metadata().offsetFieldName());
      Integer limit =
          list.metadata().limit() != null ? list.metadata().limit()
              : currentLimit(uriInfo, list.metadata().limitFieldName());
  
      return new OffsetPaginationLinks(list, uriInfo, offset, limit);
    }
docs: Creates a new instance of {@code OffsetPaginationLinks} for the provided list.
  
  @param list the list to provide links for
  @param uriInfo the {@link UriInfo} for the current request