Main uses of IdentityHashMap are:
1. Topology Preservation: The typical use of
IdentityHashMap class is topology-preserving object
graph transformations, such as serialization or deepcopying. In such a scenario, a program must maintain a
"node table" to keep track of all the object references that
have already been processed.
2. The node table should not considered distinct objects as
equal even if they happen to be equal.
3. Proxy objects: Another use of this class is to maintain
proxy objects. A debugging program has to maintain a
proxy object for each object in the program being
debugged.