commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack, Paul" <>
Subject [SUBMIT] org.apache.commons.collections.ReferenceMap
Date Thu, 23 May 2002 21:04:40 GMT
Hi all,

Had the idea for this in the thread about SoftRefHashMap,
decided to code it up, as in the past I've often required
maps with phantom keys or values.  (Usually I just 
implemented them by manually placing the references in the
map; but then you have do painful things every time you

The class differs substantially from SoftRefHashMap in 
that it can be configured to use phantom references for
values; and it can be configured to use soft, weak or
phantom keys as well.

The code's based on java.util.WeakHashMap, so it should
be solid.  I'm putting together a junit test, so far 
everything looks good.

Since this class can be configured to act like SoftRefHashMap,
it might make sense to deprecate SoftRefHashMap, for all
the reasons Christopher Marshall has outlined.  


View raw message