title: cast LinkedHashMap to HashMap in groovy
body: <p>How do I convert <code>LinkedHashMap</code> to <code>java.util.HashMap</code> in groovy?</p>
  
  <p>When I create something like this in groovy, it automatically creates a <code>LinkedHashMap</code> even when I declare it like <code>HashMap h = ....</code> or <code>def HashMap h = ...</code></p>
  
  <p>I tried doing: </p>
  
  <pre><code>HashMap h = ["key1":["val1", "val2"], "key2":["val3"]]
  </code></pre>
  
  <p>and</p>
  
  <pre><code>def HashMap h = ["key1":["val1", "val2"], "key2":["val3"]]
  </code></pre>
  
  <p><code>h.getClass().getName()</code> still comes back with <code>LinkedHashMap</code>.</p>