title: Guava: Is it valid to cast a Multimap to generic supertypes?
body: <p>Currently I'm implementing the Multimap class to allow duplicates using Multisets. In particular, I am working on the <code>boolean putAll(Multimap&lt;? extends K, ? extends V&gt; multimap)</code> method.</p>
  
  <p>I want to do this:</p>
  
  <pre><code>Map&lt;K, Collection&lt;V&gt;&gt; map = ((Multimap&lt;K, V&gt;)multimap).asMap();
  </code></pre>
  
  <p>where <code>asMap()</code> would normally return a <code>Map&lt;? extends K, Collection&lt;? extends V&gt;&gt;</code>.</p>
  
  <p>Is this valid (won't throw errors provided I don't add to the map)? If not, how can I fix this?</p>