commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map LRUMap.java
Date Sun, 25 Apr 2004 23:27:43 GMT
scolebourne    2004/04/25 16:27:43

  Modified:    collections/src/java/org/apache/commons/collections/map
                        LRUMap.java
  Log:
  Javadoc
  
  Revision  Changes    Path
  1.11      +12 -3     jakarta-commons/collections/src/java/org/apache/commons/collections/map/LRUMap.java
  
  Index: LRUMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/LRUMap.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LRUMap.java	16 Apr 2004 23:53:59 -0000	1.10
  +++ LRUMap.java	25 Apr 2004 23:27:43 -0000	1.11
  @@ -128,6 +128,7 @@
       //-----------------------------------------------------------------------
       /**
        * Moves an entry to the MRU position at the end of the list.
  +     * <p>
        * This implementation moves the updated entry to the end of the list.
        * 
        * @param entry  the entry to update
  @@ -148,7 +149,9 @@
       
       /**
        * Updates an existing key-value mapping.
  -     * This implementation moves the updated entry to the top of the list.
  +     * <p>
  +     * This implementation moves the updated entry to the top of the list
  +     * using {@link #moveToMRU(LinkEntry)}.
        * 
        * @param entry  the entry to update
        * @param newValue  the new value to store
  @@ -160,8 +163,9 @@
       
       /**
        * Adds a new key-value mapping into this map.
  +     * <p>
        * This implementation checks the LRU size and determines whether to
  -     * discard an entry or not.
  +     * discard an entry or not using {@link #removeLRU(LinkEntry)}.
        * 
        * @param hashIndex  the index into the data array to store at
        * @param hashCode  the hash code of the key to add
  @@ -178,6 +182,8 @@
       
       /**
        * Reuses an entry by removing it and moving it to a new place in the map.
  +     * <p>
  +     * This method uses {@link #removeEntry}, {@link #reuseEntry} and {@link #addEntry}.
        * 
        * @param entry  the entry to reuse
        * @param hashIndex  the index into the data array to store at
  @@ -228,6 +234,9 @@
        * }
        * </pre>
        * Note that the effect of not removing an LRU is for the Map to exceed the maximum
size.
  +     * <p>
  +     * NOTE: Commons Collections 3.0 passed the wrong entry to this method.
  +     * This is fixed in version 3.1 onwards.
        * 
        * @param entry  the entry to be removed
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message