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

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

public class KeyedWeakReference<K,T>
extends WeakReference<T>
implements KeyedReference<K,T>


Constructor Summary
KeyedWeakReference(K key, T ref)
           
KeyedWeakReference(K key, T ref, ReferenceQueue<T> queue)
           
 
Method Summary
 K getKey()
           
 ReferenceType getType()
           
 String toString()
           
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, 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

KeyedWeakReference

public KeyedWeakReference(K key,
                          T ref)

KeyedWeakReference

public KeyedWeakReference(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.