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 Mon, 07 Jun 2004 22:13:53 GMT
scolebourne    2004/06/07 15:13:53

  Modified:    collections/src/java/org/apache/commons/collections/map
                        LRUMap.java
  Log:
  Inline constant, rename getter and add since tags
  
  Revision  Changes    Path
  1.14      +9 -7      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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- LRUMap.java	12 May 2004 19:51:28 -0000	1.13
  +++ LRUMap.java	7 Jun 2004 22:13:53 -0000	1.14
  @@ -56,8 +56,6 @@
       static final long serialVersionUID = -612114643488955218L;
       /** Default maximum size */
       protected static final int DEFAULT_MAX_SIZE = 100;
  -    /** Default scan behaviour */
  -    protected static final boolean DEFAULT_SCAN_UNTIL_REMOVABLE = false;
       
       /** Maximum size */
       private transient int maxSize;
  @@ -68,7 +66,7 @@
        * Constructs a new empty map with a maximum size of 100.
        */
       public LRUMap() {
  -        this(DEFAULT_MAX_SIZE, DEFAULT_LOAD_FACTOR, DEFAULT_SCAN_UNTIL_REMOVABLE);
  +        this(DEFAULT_MAX_SIZE, DEFAULT_LOAD_FACTOR, false);
       }
   
       /**
  @@ -87,6 +85,7 @@
        * @param maxSize  the maximum size of the map
        * @param scanUntilRemovable  scan until a removeable entry is found, default false
        * @throws IllegalArgumentException if the maximum size is less than one
  +     * @since Commons Collections 3.1
        */
       public LRUMap(int maxSize, boolean scanUntilRemovable) {
           this(maxSize, DEFAULT_LOAD_FACTOR, scanUntilRemovable);
  @@ -102,7 +101,7 @@
        * @throws IllegalArgumentException if the load factor is less than zero
        */
       public LRUMap(int maxSize, float loadFactor) {
  -        this(maxSize, loadFactor, DEFAULT_SCAN_UNTIL_REMOVABLE);
  +        this(maxSize, loadFactor, false);
       }
   
       /**
  @@ -114,6 +113,7 @@
        * @param scanUntilRemovable  scan until a removeable entry is found, default false
        * @throws IllegalArgumentException if the maximum size is less than one
        * @throws IllegalArgumentException if the load factor is less than zero
  +     * @since Commons Collections 3.1
        */
       public LRUMap(int maxSize, float loadFactor, boolean scanUntilRemovable) {
           super((maxSize < 1 ? DEFAULT_CAPACITY : maxSize), loadFactor);
  @@ -134,7 +134,7 @@
        * @throws IllegalArgumentException if the map is empty
        */
       public LRUMap(Map map) {
  -        this(map, DEFAULT_SCAN_UNTIL_REMOVABLE);
  +        this(map, false);
       }
   
       /**
  @@ -146,6 +146,7 @@
        * @param scanUntilRemovable  scan until a removeable entry is found, default false
        * @throws NullPointerException if the map is null
        * @throws IllegalArgumentException if the map is empty
  +     * @since Commons Collections 3.1
        */
       public LRUMap(Map map, boolean scanUntilRemovable) {
           this(map.size(), DEFAULT_LOAD_FACTOR, scanUntilRemovable);
  @@ -339,8 +340,9 @@
        * map is full.
        *
        * @return true if this map scans
  +     * @since Commons Collections 3.1
        */
  -    public boolean scanUntilRemovable() {
  +    public boolean isScanUntilRemovable() {
           return scanUntilRemovable;
       }
   
  
  
  

---------------------------------------------------------------------
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