A DESCRIPTION OF THE REQUEST :
In order to model a cache, it is quite useful to have a class similar to WeakHashMap. But, in my opinion, this class is designed wrong. It should not reference the keys by WeakReferences, but the values.
An example:
Imagine a cache for images. A quite useful model would be a map, where you put image values with key-reference by their pathname (HashMap<String, Image>)
So, if an image is not references anywhere, it could be deleted (and garbage collected) from the cache and reloaded if needed again afterwards.
The class WeakHashMap is NOT useful for this kind of behaviour, since it weakly references the keys, which would be the pathname in this example. But the keys in any cachmodel are always known and present; its the values you want to cache (and maybe remove if not used).
JUSTIFICATION :
Caching is very important and widely used in many programs.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
maybe a whole cache package would be nice with different kind of caches, not only a memory-based one
ACTUAL -
see description
CUSTOMER SUBMITTED WORKAROUND :
write your own cache