|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ref.Reference<T>
java.lang.ref.SoftReference
org.onemind.commons.java.lang.ref.SoftHashMap.SoftValue
private static class SoftHashMap.SoftValue
We define our own subclass of SoftReference which contains not only the value but also the key to make it easier to find the entry in the HashMap after it's been garbage collected.
Field Summary | |
---|---|
private java.lang.Object |
key
|
Constructor Summary | |
---|---|
private |
SoftHashMap.SoftValue(java.lang.Object k,
java.lang.Object key,
java.lang.ref.ReferenceQueue q)
Did you know that an outer class can access private data members and methods of an inner class? I didn't know that! I thought it was only the inner class who could access the outer class's private information. |
Method Summary |
---|
Methods inherited from class java.lang.ref.SoftReference |
---|
get |
Methods inherited from class java.lang.ref.Reference |
---|
clear, enqueue, isEnqueued |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.Object key
Constructor Detail |
---|
private SoftHashMap.SoftValue(java.lang.Object k, java.lang.Object key, java.lang.ref.ReferenceQueue q)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |