public class SoftReferenceWithKey
extends java.lang.ref.SoftReference
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
key |
Constructor and Description |
---|
SoftReferenceWithKey(java.lang.Object referent,
java.lang.Object key,
java.lang.ref.ReferenceQueue q)
Creates a new SoftReference with a key.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getKey()
Returns the key associated with this reference.
|
public SoftReferenceWithKey(java.lang.Object referent, java.lang.Object key, java.lang.ref.ReferenceQueue q)
referent
- object the new soft reference will refer tokey
- the key objectq
- queue the soft reference is registered with