IdentityHashMap is a variant on HashMap which tests equality by reference instead of equality by value. Basically, keys and values are compared for equality by checking if their references are equal rather than by calling the "equals" function.
Note: This class intentionally violates the general contract of {@code Map}'s on comparing objects by their {@code equals} method.
IdentityHashMap uses open addressing (linear probing in particular) for collision resolution. This is different from HashMap which uses Chaining.
Like HashMap, IdentityHashMap is not thread safe, so access by multiple threads must be synchronized by an external mechanism such as Collections.synchronizedMap.
@since 1.4