Is there a SoftHashMap in Java?
Edit (Aug. 2012): It turns out that currently the best solution are probably Guava 13.0’s Cache classes, explained on Guava’s Wiki – that’s what I’m going to use. It even supports building a SoftHashMap (see CacheBuilder.newBuilder().softKeys()), but it is probably not what you want, as Java expert Jeremy Manson explains (below you’ll find the link). … Read more