docs: private static <A, B> Map<A, B> listToMap(List<Map.Entry<A, B>> list) {
      Map<A, B> result = new LinkedHashMap<A, B>();
      for (Iterator<Map.Entry<A, B>> it = list.iterator(); it.hasNext();) {
        Map.Entry<A, B> entry = (Map.Entry<A, B>) it.next();
        result.put(entry.getKey(), entry.getValue());
      }
      return result;
    }