title: java 8: remove element from list if its not found in map key
body: <p>I would like to remove all list elements, which their last split char not founded as a key in some map. I use following code: </p>
  
  <pre><code>   List&lt;String&gt; myList = Arrays.asList("a.b.c,c.d.e".split(","));
     myList.add("a.b.c");
     Map myMap = new HashMap();
     myMap.put("a","dumy");
     myList.removeIf(el-&gt;!myMap.containsKey(el.substring(el.lastIndexOf('.') + 1)));
  </code></pre>
  
  <p>I get following error: <code>Method threw 'java.lang.UnsupportedOperationException' exception</code>.</p>
  
  <p>any idea what I did wrong?</p>