java.lang.ref.SoftReference< T > Class Reference

Inheritance diagram for java.lang.ref.SoftReference< T >:

java.lang.ref.Reference< T >

List of all members.


Detailed Description

SoftReference objects are used to detect referents which are no longer visible and who's memory is to be reclaimed.

Since:
1.2

Public Member Functions

 SoftReference (T r)
 Constructs a new instance of this class.
 SoftReference (T r, ReferenceQueue<?super T > q)
 Constructs a new instance of this class.
get ()
 Return the referent of the reference object.

Constructor & Destructor Documentation

java.lang.ref.SoftReference< T >.SoftReference ( r  ) 

Constructs a new instance of this class.

Parameters:
r referent to track.

java.lang.ref.SoftReference< T >.SoftReference ( r,
ReferenceQueue<?super T >  q 
)

Constructs a new instance of this class.

Parameters:
r referent to track.
q queue to register to the reference object with.


Member Function Documentation

T java.lang.ref.SoftReference< T >.get (  ) 

Return the referent of the reference object.

Returns:
Object Referent to which reference refers, or null if object has been cleared.

Reimplemented from java.lang.ref.Reference< T >.


The documentation for this class was generated from the following file:

Genereated on Tue Dec 9 14:09:48 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.