title: Reverse Map structure using Java 8 streams
body: <p>Given a class</p>
  
  <pre><code>public class MyClass {
      public int langId;
      public int sectionId;
  }
  </code></pre>
  
  <p>If I have a map that maps a LangId to all the instances of MyClass that have that LangId:</p>
  
  <pre><code>Map&lt;Integer, List&lt;MyClass&gt;&gt; mapLangIdToListOfMyClass = new HashMap&lt;&gt;();
  </code></pre>
  
  <p>Using Java 8 streams, would there be a simple way to consume the previous Map and create a new Map that maps SectionId to all the instances of MyClass that has that SectionId:</p>
  
  <pre><code>Map&lt;Integer, List&lt;MyClass&gt;&gt; mapSectionIdToListOfMyClass = new HashMap&lt;&gt;();
  </code></pre>