docs: public static List<List<QValueResult>> parse(List<String> headers) {
          final List<QValueResult> found = new ArrayList<>();
          QValueResult current = null;
          for (final String header : headers) {
              final int l = header.length();
              //we do not use a string builder
              //we just keep track of where the current string starts and call substring()
              int stringStart = 0;
              for (int i = 0; i < l; ++i) {
                  char c = header.charAt(i);
                  switch (c) {
                      case ',': {
                          if (current != null &&
                                  (i - stringStart > 2 && header.charAt(stringStart) == 'q' &&
                                          header.charAt(stringStart + 1) == '=')) {
                              //if this is a valid qvalue
                              current.qvalue = header.substring(stringStart + 2, i);
                              current = null;
                          } else if (stringStart != i) {
                              current = handleNewEncoding(found, header, stringStart, i);
                          }
                          stringStart = i + 1;
                          break;
                      }
                      case ';': {
                          if (stringStart != i) {
                              current = handleNewEncoding(found, header, stringStart, i);
                              stringStart = i + 1;
                          }
                          break;
                      }
                      case ' ': {
                          if (stringStart != i) {
                              if (current != null &&
                                      (i - stringStart > 2 && header.charAt(stringStart) == 'q' &&
                                              header.charAt(stringStart + 1) == '=')) {
                                  //if this is a valid qvalue
                                  current.qvalue = header.substring(stringStart + 2, i);
                              } else {
                                  current = handleNewEncoding(found, header, stringStart, i);
                              }
                          }
                          stringStart = i + 1;
                      }
                  }
              }
  
              if (stringStart != l) {
                  if (current != null &&
                          (l - stringStart > 2 && header.charAt(stringStart) == 'q' &&
                                  header.charAt(stringStart + 1) == '=')) {
                      //if this is a valid qvalue
                      current.qvalue = header.substring(stringStart + 2, l);
                  } else {
                      current = handleNewEncoding(found, header, stringStart, l);
                  }
              }
          }
          Collections.sort(found, Collections.reverseOrder());
          String currentQValue = null;
          List<List<QValueResult>> values = new ArrayList<>();
          List<QValueResult> currentSet = null;
  
          for(QValueResult val : found) {
              if(!val.qvalue.equals(currentQValue)) {
                  currentQValue = val.qvalue;
                  currentSet = new ArrayList<>();
                  values.add(currentSet);
              }
              currentSet.add(val);
          }
          return values;
      }