title: Java8: How to Convert Map<X, List<Y>> to Map<Y,X> using Stream?
body: <p>I am new to Java8. A problem that I want to solve is to convert Map> to Map using Stream. For example:</p>
  
  <pre><code>input: {A =&gt; [B, C, D], E =&gt; [F]}
  output: {B =&gt; A, C =&gt; A, D =&gt; A, F =&gt; E}
  </code></pre>
  
  <p>Let's assume that there is no duplicated value in List. How to do it in java 8 stream in an elegant way?</p>
  
  <p>Cheers,
  Wei</p>