M
Mize-ze
Why can't I compile the following code?
Map bestUtilities;
.....
for(Map.Entry<Edge,ActionItem> me : bestUtilities.entrySet())
{
// Some stuff
}
I guessed at first that I cannot compile it because the bestUtilities
Map is not Generic and when I try to iterate on its entrySet with a
generic entry I get this incompatability/conversion problem
BUT when I tried simply Map.Entry it did not compile too.
It [eclipse 3.2]says:
"Type mismatch: cannot convert from element type Object to
Map.Entry<Edge,ActionItem>"
What am I missing here?
Thanks
Map bestUtilities;
.....
for(Map.Entry<Edge,ActionItem> me : bestUtilities.entrySet())
{
// Some stuff
}
I guessed at first that I cannot compile it because the bestUtilities
Map is not Generic and when I try to iterate on its entrySet with a
generic entry I get this incompatability/conversion problem
BUT when I tried simply Map.Entry it did not compile too.
It [eclipse 3.2]says:
"Type mismatch: cannot convert from element type Object to
Map.Entry<Edge,ActionItem>"
What am I missing here?
Thanks