docs: private static FitnessAndQuality fitnessAndQualityParsed(String mimeType, Collection<ParseResults> parsedRanges) {
          int bestFitness = -1;
          float bestFitQ = 0;
          ParseResults target = parseMediaRange(mimeType);
  
          for (ParseResults range : parsedRanges) {
              if ((target.type.equals(range.type) || range.type.equals("*") || target.type.equals("*"))
                      && (target.subType.equals(range.subType) || range.subType.equals("*")
                      || target.subType.equals("*"))) {
                  for (String k : target.params.keySet()) {
                      int paramMatches = 0;
                      if (!k.equals("q") && range.params.containsKey(k)
                              && target.params.get(k).equals(range.params.get(k))) {
                          paramMatches++;
                      }
                      int fitness = (range.type.equals(target.type)) ? 100 : 0;
                      fitness += (range.subType.equals(target.subType)) ? 10 : 0;
                      fitness += paramMatches;
                      if (fitness > bestFitness) {
                          bestFitness = fitness;
                          bestFitQ = toFloat(range.params.get("q"), 0);
                      }
                  }
              }
          }
          return new FitnessAndQuality(bestFitness, bestFitQ);
      }