API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang.ref. SoftReference View Source
Author(s)
Mark Reinhold
Since
1.2
Version
1.35, 11/17/05
Serial
Hierarchy
 Object
      Reference
          SoftReference
Implements
Subclasses
Description
public class SoftReference
  Soft reference objects, which are cleared at the discretion of the garbage collector in response to memory demand.
See also:   
Constructors
public SoftReference ( T referent)
  Creates a new soft reference that refers to the given object.
public SoftReference ( T referent, ReferenceQueue<Object> q)
  Creates a new soft reference that refers to the given object and is registered with the given queue.
Methods
Hide/Show inherited methods
public void clear () [Inherited From Reference]
  Clears this reference object.
public boolean enqueue () [Inherited From Reference]
  Adds this reference object to the queue with which it is registered, if any.
public T get () [Overrides Reference]
  Returns this reference object's referent.
public boolean isEnqueued () [Inherited From Reference]
  Tells whether or not this reference object has been enqueued, either by the program or by the garbage collector.
Fields
Hide/Show inherited fields
pack-private Reference next [Inherited From Reference]
pack-private ReferenceQueue<Object> queue [Inherited From Reference]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar