docs: public static AcceptPreference fromHeaders(Collection<AcceptPreference> headers) {
          if (headers.isEmpty()) {
              throw new IllegalArgumentException("Header list must contain at least one element.");
          }
  
          TreeSet<AcceptHeaderEntry> entries = new TreeSet<>();
          for (AcceptPreference header : headers) {
              // It's OK to do this as AcceptHeaderEntry is immutable.
              entries.addAll(header.entries);
          }
  
          return new AcceptPreference(entries);
      }