Map
implementation that matches keys and values based on ==
not equals()
. This map will violate the detail of various Map and map view contracts. As a general rule, don't compare this map to other maps. In particular, you can't use decorators like {@link ListOrderedMap} on it, which silently assume that thesecontracts are fulfilled. Note that IdentityMap is not synchronized and is not thread-safe. If you wish to use this map from multiple threads concurrently, you must use appropriate synchronization. The simplest approach is to wrap this map using {@link java.util.Collections#synchronizedMap(Map)}. This class may throw exceptions when accessed by concurrent threads without synchronization. From 4.0, this class is replaced by java.util.IdentityHashMap but kept as a test-class because it is still used by the ReferenceIdentityMapTest.
@since 3.0
@version $Id: IdentityMap.java 1469004 2013-04-17 17:37:03Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|