First of all, declare your map like this (line 14):
Then you can get rid of the casts in lines 18 and 22.
I tried your code and it worked without errors!
You most likely have a class that you wrote yourself that is called Map, and Java is getting confused, it takes your own class Map instead of the Map from java.util. Rename or delete your own class Map.