title: Remove a value from a arraylist who is in a hashmap
body: <p><strong>I've got a hashmap who contains a arraylist as value. I want to check if one of the arraylists contains a object, and then remove that object from the arraylist. But, how?</strong></p>
  
  <p>I've tried using some for loops, but I get a ConcurrentModificationException then, and I can't get that exception away.</p>
  
  <p><strong>My hashmap:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>HashMap&lt;String,ArrayList&lt;UUID&gt;&gt; inareamap = new HashMap&lt;String, ArrayList&lt;UUID&gt;&gt;();
  </code></pre>
  
  <p>I want to check if the ArrayList contains the UUID I've got, and if so, I want to remove it from that ArrayList. But I don't know the String at that position of the code.</p>
  
  <p><strong>What I already tried:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>for (ArrayList&lt;UUID&gt; uuidlist : inareamap.values()) {
      for (UUID uuid : uuidlist) {
          if (uuid.equals(e.getPlayer().getUniqueId())) {
              for (String row : inareamap.keySet()) {
                  if (inareamap.get(row).equals(uuidlist)) {
                      inareamap.get(row).remove(uuid);
                  }
              }
          }
      }
  }
  </code></pre>