private static Map<String, String> union(
      Map<String, String> a, Map<String, String> b) {
    if (a.isEmpty()) {
      return b;
    } else if (b.isEmpty()) {
      return a;
    } else {
      Map<String, String> union = new HashMap<String, String>();
      union.putAll(a);
      union.putAll(b);
      return union;
    }
  }
Immutable sorted map of media type parameters.
crawler-commons/src/main/java/achecrawler/crawler/crawlercommons/util/MediaType.java