Changed HashMap to Map and Product's hashcode