title: How to initialize a map using a lambda?
body: <p>I want to declare a fully populated map field in a single statement, (which may contain several nested statements,) like this:</p>
  
  <pre><code>private static final Map&lt;Integer,Boolean&gt; map = 
      something-returning-an-unmodifiable-fully-populated-HashMap;
  </code></pre>
  
  <p>Anonymous initializers won't do, for the same reason that invoking a function which returns a new populated map won't do: they require two top-level statements: one for the variable declaration, and one for the method or initializer.</p>
  
  <p>The double curly bracket (<code>{{</code> and <code>}}</code>) idiom will work, but it creates a whole new class which extends <code>HashMap&lt;&gt;</code>, and I do not like the overhead represented by this.</p>
  
  <p>Do the lambdas of Java 8 perhaps offer a better way of accomplishing this?</p>