title: java 8 - immutablemap for loop
body: <p>Im new to java, I used a hashmap initially and did a forEach over that, it worked fine:</p>
  
  <pre><code>Map&lt;String, Integer&gt; testmap = new HashMap&lt;&gt;();
  IntStream.range(0, 100).forEach(n -&gt; {
                  testmap.put("teststring-" + Integer.toString(n), 1);
              });
  String x = testmap.entrySet().stream().filter(..);
  </code></pre>
  
  <p>However, now I have a ImmutableHashMap which I want to do the same above steps, how would I do that? I tried doing</p>
  
  <pre><code>ImmutableMap.Builder&lt;String, Integer&gt; testmap = ImmutableMap.builder(); 
  IntStream.range(0, 100).forEach(n -&gt; {
              testmap.put("teststring-" + Integer.toString(n), 1);
          });
  testmap.build();
  String x = testmap.entrySet().stream().filter(...); // throws an error while compile
  
  cannot find symbol
      [javac]         String testmap = testmap.entrySet().stream()
      [javac]                                ^
      [javac]   symbol:   method entrySet()
      [javac]   location: variable streams of type Builder&lt;String,Integer&gt;
  </code></pre>
  
  <p>Can anyone point out what i'm doing wrong here? thanks much for all your help!</p>