Java: Map entry Boolean value throws an error : <p>I have a Map with a <code>GregorianCalendar</code> key and <code>Boolean</code> value. The for loop. The <code>Map.Entry&lt;...&gt;</code> is underlined and it says</p>

<pre><code>Incompatible types.
Required: Object
Found: Entry&lt;java.util.GregorianCalendar, java.lang.Boolean&gt;
</code></pre>

<p>My code is:</p>

<pre><code>public static int getDay(GregorianCalendar day) {
    Map days = getDays();

    for (Map.Entry&lt;GregorianCalendar, Boolean&gt; entry : days.entrySet())
    {

    }

    return -1;
}
</code></pre>

<p>If someone knows what I'm doing wrong please help me. Really appreciate.</p>
