Package org.jboss.util.collection
Class SoftValueRef<K,V>
- java.lang.Object
-
- java.lang.ref.Reference<T>
-
- java.lang.ref.SoftReference<V>
-
- org.jboss.util.collection.SoftValueRef<K,V>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSoftValueRef(K key, V val, java.lang.ref.ReferenceQueue<V> q)Create a new SoftValueRef.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static <K,V>
SoftValueRef<K,V>create(K key, V val, java.lang.ref.ReferenceQueue<V> q)Safely create a new SoftValueRefKgetKey()VgetValue()VsetValue(V value)java.lang.StringtoString()-
Methods inherited from class java.lang.ref.Reference
clear, clone, enqueue, isEnqueued, reachabilityFence
-
-
-
-
Field Detail
-
key
public K key
The key
-
-
Method Detail
-
create
static <K,V> SoftValueRef<K,V> create(K key, V val, java.lang.ref.ReferenceQueue<V> q)
Safely create a new SoftValueRef- Type Parameters:
K- the key typeV- the value type- Parameters:
key- the keyval- the valueq- the reference queue- Returns:
- the reference or null if the value is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-