title: Getting all objects with same key from a MultiValueMap
body: <p>I have a <a href="https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/MultiValueMap.html" rel="nofollow"><code>MultiValueMap&lt;Integer, Path&gt;</code></a> from which I am trying to get [<em>print for the purpose of this question</em>] out all the paths which were put in the map using the same key.</p>
  
  <p>This is my current solution:</p>
  
  <pre><code>MultiValueMap&lt;Integer, Path&gt; duplicates = duplicateFinder.getDuplicates();
  
  for (Map.Entry&lt;Integer, Object&gt; entry: duplicates.entrySet()) {
    final Integer key = entry.getKey();
    final Object obj = entry.getValue();
    for (Object o: (LinkedList)((ArrayList)entry.getValue()).get(0))
      System.out.println(o);
    System.out.println();
  }
  </code></pre>
  
  <p>I feel my solution is dangerous (casting and magic number 0) and would like to avoid it.
  How can I achieve the desired result in a more readable/safe manner?</p>