I have a series of objects that contain a name field, and I want to store them in a HashMap, with the key of each object being it's name. Is there a way to do this such that changing the object's name field also changes the key in the HashMap (and even vice versa).
(is it possible to have a sort of double reference in Java, such that the key references the name field (which references the String)).