org.eclipse.net4j.util.ref
Class KeyedSoftReference<K,T>

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.SoftReference<T>
          extended by org.eclipse.net4j.util.ref.KeyedSoftReference<K,T>
All Implemented Interfaces:
KeyedReference<K,T>

public class KeyedSoftReference<K,T>
extends SoftReference<T>
implements KeyedReference<K,T>


Constructor Summary
KeyedSoftReference(K key, T ref)
           
KeyedSoftReference(K key, T ref, ReferenceQueue<T> queue)
           
 
Method Summary
 K getKey()
           
 ReferenceType getType()
           
 String toString()
           
 
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, wait, wait, wait
 
Methods inherited from interface org.eclipse.net4j.util.ref.KeyedReference
clear, enqueue, get, isEnqueued
 

Constructor Detail

KeyedSoftReference

public KeyedSoftReference(K key,
                          T ref)

KeyedSoftReference

public KeyedSoftReference(K key,
                          T ref,
                          ReferenceQueue<T> queue)
Method Detail

getType

public ReferenceType getType()
Specified by:
getType in interface KeyedReference<K,T>

getKey

public K getKey()
Specified by:
getKey in interface KeyedReference<K,T>

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.