I wrote the following method
validate(Map map)
And I want to call it with
dogMap = new HashMap
You can change the signature of validate to :
validate
This will allow you to pass any map with a String key and a value that extends or implements IAnimal.
String
IAnimal