title: How to map values from map to object based on containsKey?
body: <p>I have a map of values like so:</p>
  
  <pre><code>Map&lt;String, Object&gt; values = Map.of("name", "myName", "address", null);
  </code></pre>
  
  <p>I want to update an object like this:</p>
  
  <pre><code>class User {
    String name;
    String address;
    String country;
  }
  </code></pre>
  
  <p>Now I want the fields in <code>User</code> to be overwritten <em>only</em> if the source map has the key defined. So the <code>address</code> field should be set to null (because there's an explicit mapping to null), but the <code>country</code> field should not be changed (because there's no <code>"country"</code> key in the map).</p>
  
  <p>This is similar to what <code>nullValuePropertyMappingStrategy = IGNORE</code> does, but not quite, as the check is a <code>map.containsKey</code> check instead of a standard null check.</p>
  
  <p>Can I extend MapStruct so it can do this?</p>
  
  <p>My MapStruct code:</p>
  
  <pre><code>@Mapper
  interface MyMapper {
      @Mapping(target = "name", expression = "java( from.getMap().get(\"name\") )")
      @Mapping(target = "address", expression = "java( from.getMap().get(\"address\") )")
      @Mapping(target = "country", expression = "java( from.getMap().get(\"country\") )")
      To get(MapWrapper from, @MappingTarget To to);
  }
  </code></pre>