hchar       2005/02/03 04:12:20

  Modified:    sandbox/yajcache/src/org/apache/jcs/yajcache/lang/ref
                        KeyedSoftReference.java KeyedWeakReference.java
  Log:
  javadoc + annotate
  
  Revision  Changes    Path
  1.5       +24 -6     
jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/ref/KeyedSoftReference.java
  
  Index: KeyedSoftReference.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/ref/KeyedSoftReference.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- KeyedSoftReference.java   30 Jan 2005 10:51:28 -0000      1.4
  +++ KeyedSoftReference.java   3 Feb 2005 12:12:20 -0000       1.5
  @@ -22,7 +22,7 @@
   import org.apache.jcs.yajcache.lang.annotation.*;
   
   /**
  - * Soft reference with an embedded key.
  + * [EMAIL PROTECTED] SoftReference} with an embedded key.
    *
    * @author Hanson Char
    */
  @@ -30,21 +30,39 @@
   public class KeyedSoftReference<K,T> extends SoftReference<T> 
           implements IKey<K> 
   {
  -    private final @NonNullable K key;
  +    /** The embedded key. */
  +    private final @NonNullable @Immutable K key;
       
  -    public KeyedSoftReference(@NonNullable K key, T referent) 
  +    /**
  +     * Creates a new soft reference with an embedded key that refers to 
  +     * the given object.  The new
  +     * reference is not registered with any queue.
  +     *
  +     * @param key the embedded key of the new soft reference
  +     * @param referent object the new soft reference will refer to
  +     */
  +    public KeyedSoftReference(@NonNullable @Immutable K key, T referent) 
       {
        super(referent);
           this.key = key;
       }
  -    public KeyedSoftReference(@NonNullable K key, T referrent, 
  +    /**
  +     * Creates a new soft reference with an embedded key that refers to 
  +     * the given object and is registered with the given queue.
  +     *
  +     * @param key the embedded key of the new soft reference
  +     * @param referent object the new soft reference will refer to
  +     * @param q the queue with which the reference is to be registered,
  +     *          or <tt>null</tt> if registration is not required
  +     */
  +    public KeyedSoftReference(@NonNullable @Immutable K key, T referent, 
               ReferenceQueue<? super T> q) 
       {
  -        super(referrent, q);
  +        super(referent, q);
           this.key = key;
       }
       @Implements(IKey.class)
  -    public @NonNullable K getKey() {
  +    public @NonNullable @Immutable K getKey() {
           return this.key;
       }
   }
  
  
  
  1.7       +24 -6     
jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/ref/KeyedWeakReference.java
  
  Index: KeyedWeakReference.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-jcs/sandbox/yajcache/src/org/apache/jcs/yajcache/lang/ref/KeyedWeakReference.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- KeyedWeakReference.java   2 Feb 2005 11:34:50 -0000       1.6
  +++ KeyedWeakReference.java   3 Feb 2005 12:12:20 -0000       1.7
  @@ -21,7 +21,7 @@
   
   import org.apache.jcs.yajcache.lang.annotation.*;
   /**
  - * Weak reference with an embedded key.
  + * [EMAIL PROTECTED] WeakReference} with an embedded key.
    *
    * @author Hanson Char
    */
  @@ -29,20 +29,38 @@
   public class KeyedWeakReference<K,T> extends WeakReference<T> 
           implements IKey<K> 
   {
  -    public final @NonNullable K key;
  +    /** The embedded key. */
  +    public final @NonNullable @Immutable K key;
   
  -    public KeyedWeakReference(@NonNullable K key, T referent) {
  +    /**
  +     * Creates a new weak reference with an embedded key that refers to 
  +     * the given object.  The new
  +     * reference is not registered with any queue.
  +     *
  +     * @param key the embedded key of the new weak reference
  +     * @param referent object the new weak reference will refer to
  +     */
  +    public KeyedWeakReference(@NonNullable @Immutable K key, T referent) {
        super(referent);
           this.key = key;
       }
  -    public KeyedWeakReference(@NonNullable K key, T referrent, 
  +    /**
  +     * Creates a new weak reference with an embedded key that refers to 
  +     * the given object and is registered with the given queue.
  +     *
  +     * @param key the embedded key of the new weak reference
  +     * @param referent object the new weak reference will refer to
  +     * @param q the queue with which the reference is to be registered,
  +     *          or <tt>null</tt> if registration is not required
  +     */
  +    public KeyedWeakReference(@NonNullable @Immutable K key, T referent, 
               ReferenceQueue<? super T> q) 
       {
  -        super(referrent, q);
  +        super(referent, q);
           this.key = key;
       }
       @Implements(IKey.class)
  -    public @NonNullable K getKey() {
  +    public @NonNullable @Immutable K getKey() {
           return this.key;
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to