title: Is there a SoftHashMap in Java?
body: <p>I know there is a <code>WeakHashMap</code> in <code>java.util</code>, but since it uses <code>WeakReference</code>s for everything, which is only referenced by this <code>Map</code>, referenced objects will get lost on the next GC cycle. So it's nearly useless if you want to cache random data, which is very likely to be requested again without being Hard-linked the rest of the time. The best solution would be a map, which uses <code>SoftReference</code>s instead, but I didn't find one in the Java RT Package.</p>