code: private static <K, V> boolean mapsHaveCompatibleOverlap(Map<K, V> a, Map<K, V> b) {
      if (b.size() < a.size()) {
        Map<K, V> t = a;
        a = b;
        b = t;
      }
      boolean overlap = false;
      for (Map.Entry<K, V> e : a.entrySet()) {
        V value = b.get(e.getKey());
        if (value != null) {
          if (!value.equals(e.getValue())) {
            return false;
          }
          overlap = true;
        } else if (b.containsKey(e.getKey())) {
          if (e.getValue() != null) {
            return false;
          }
          overlap = true;
        }
      }
      return overlap;
    }
docs: True if the two maps have at least one (key, value) pair in common, and no pairs with the same
  key but different values according to {@link Object#equals}.