public static <K, V> Map<K, V> with(Map<K, V> a, K k, V v) {
    Map<K, V> copy = new HashMap<>(a);
    if (v == null || "".equals(v)) {
      copy.remove(k);
    } else {
      copy.put(k, v);
    }
    return copy;
  }
Returns a new map the entries of {@code a} added to {@code (k, v)}.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/MapUtil.java