title: LinkedHashMap$Entry cannot be cast to java.util.LinkedHashMap
body: <p>I'm wrapped <code>LinkedHashMap&lt;String, LinkedHashMap&lt;Date, Double&gt;&gt;</code> into a List with;</p>
  
  <pre><code>List&lt;LinkedHashMap&lt;String, LinkedHashMap&lt;Date, Double&gt;&gt;&gt; list = new ArrayList(mainCodesMap.entrySet());
  </code></pre>
  
  <p>which <code>mainCodeMap</code> is type of <code>Map&lt;String, Map&lt;Date, Double&gt;&gt;</code></p>
  
  <p>the thing is there is no problem with list,however, when I try to get elements of list by index in a for loop like;</p>
  
  <pre><code>for (int i = 0; i &lt; correMatrix.length; i++) {
  
      LinkedHashMap&lt;String, LinkedHashMap&lt;Date, Double&gt;&gt; entryRow = list.get(i);
      LinkedHashMap&lt;Date, Double&gt; entryRowData = (LinkedHashMap&lt;Date, Double&gt;) entryRow.values();
      ..
      ..
  }
  </code></pre>
  
  <p>jvm throws <code>ClassCastException</code> which says;</p>
  
  <pre><code>java.lang.ClassCastException: java.util.LinkedHashMap$Entry cannot be cast to java.util.LinkedHashMap
  </code></pre>