org.vrspace.neurogrid
Class SoftCache.SoftValue

java.lang.Object
  extended byjava.lang.ref.Reference
      extended byjava.lang.ref.SoftReference
          extended byorg.vrspace.neurogrid.SoftCache.SoftValue
Enclosing class:
SoftCache

protected class SoftCache.SoftValue
extends java.lang.ref.SoftReference

Internal class to allow for easy removal of key-value pair when value has been reclaimed from SoftReference


Constructor Summary
SoftCache.SoftValue(java.lang.Object key, java.lang.Object value, java.lang.ref.ReferenceQueue rq)
          SoftValue constructor
 
Method Summary
 java.lang.Object getKey()
          Get the actual object
 
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
 

Constructor Detail

SoftCache.SoftValue

public SoftCache.SoftValue(java.lang.Object key,
                           java.lang.Object value,
                           java.lang.ref.ReferenceQueue rq)
SoftValue constructor

Parameters:
key - the key used to reference
value - the object we are actually caching
rq - a reference queues, to which registered reference objects are appended by the garbage collector after the appropriate reachability changes are detected.
Method Detail

getKey

public java.lang.Object getKey()
Get the actual object

Returns:
Object