title: How to convert List to Map with indexes using stream - Java 8?
body: <p>I've created method whih numerating each character of alphabet. I'm learning streams(functional programming) and try to use them as often as possible, but I don't know how to do it in this case:</p>
  
  <pre><code>private Map&lt;Character, Integer&gt; numerateAlphabet(List&lt;Character&gt; alphabet) {
      Map&lt;Character, Integer&gt; m = new HashMap&lt;&gt;();
      for (int i = 0; i &lt; alphabet.size(); i++)
          m.put(alphabet.get(i), i);
      return m;
  }
  </code></pre>
  
  <p>So, how to rewrite it using streams of Java 8?</p>