Generic hashMap implementation