/[classpath]/classpath/java/lang/ref/SoftReference.java
ViewVC logotype

Diff of /classpath/java/lang/ref/SoftReference.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mark, Tue Jan 22 22:27:00 2002 UTC revision 1.3.2.1 by tromey, Sat Aug 7 19:32:57 2004 UTC
# Line 1  Line 1 
1  /* java.lang.ref.SoftReference  /* java.lang.ref.SoftReference
2     Copyright (C) 1999 Free Software Foundation, Inc.     Copyright (C) 1999, 2004 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 47  package java.lang.ref; Line 47  package java.lang.ref;
47   *   *
48   * @author Jochen Hoenicke   * @author Jochen Hoenicke
49   */   */
50  public class SoftReference  public class SoftReference<T>
51    extends Reference    extends Reference<T>
52  {  {
53    /**    /**
54     * Create a new soft reference, that is not registered to any queue.     * Create a new soft reference, that is not registered to any queue.
55     * @param referent the object we refer to.     * @param referent the object we refer to.
56     */     */
57    public SoftReference(Object referent)    public SoftReference(T referent)
58    {    {
59      super(referent);      super(referent);
60    }    }
# Line 65  public class SoftReference Line 65  public class SoftReference
65     * @param q the reference queue to register on.     * @param q the reference queue to register on.
66     * @exception NullPointerException if q is null.     * @exception NullPointerException if q is null.
67     */     */
68    public SoftReference(Object referent, ReferenceQueue q)    public SoftReference(T referent, ReferenceQueue<? super T> q)
69    {    {
70      super(referent, q);      super(referent, q);
71    }    }
# Line 75  public class SoftReference Line 75  public class SoftReference
75     * @return the object, this reference refers to, or null if the     * @return the object, this reference refers to, or null if the
76     * reference was cleared.     * reference was cleared.
77     */     */
78    public Object get()    public T get()
79    {    {
80      /* Why is this overloaded???      /* Why is this overloaded???
81       * Maybe for a kind of LRU strategy. */       * Maybe for a kind of LRU strategy. */

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.3.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26