jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: jakarta-oro/src/java/org/apache/oro/util GenericCache.java
Date Sat, 19 May 2001 20:15:04 GMT
dfs         01/05/19 13:15:04

  Modified:    src/java/org/apache/oro/util GenericCache.java
  Log:
  Changed backing store from Hashtable to HashMap, hoping to squeeze a little better performance.
  
  Revision  Changes    Path
  1.4       +6 -4      jakarta-oro/src/java/org/apache/oro/util/GenericCache.java
  
  Index: GenericCache.java
  ===================================================================
  RCS file: /home/cvs/jakarta-oro/src/java/org/apache/oro/util/GenericCache.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GenericCache.java	2001/05/09 18:22:51	1.3
  +++ GenericCache.java	2001/05/19 20:15:04	1.4
  @@ -70,7 +70,7 @@
    * {@link Cache} interface.
   
    @author <a href="mailto:oro-dev@jakarta.apache.org">Daniel F. Savarese</a>
  - @version $Id: GenericCache.java,v 1.3 2001/05/09 18:22:51 dfs Exp $
  + @version $Id: GenericCache.java,v 1.4 2001/05/19 20:15:04 dfs Exp $
   
    * @see Cache
    * @see CacheLRU
  @@ -87,7 +87,7 @@
   
     int _numEntries;
     GenericCacheEntry[] _cache;
  -  Hashtable _table;
  +  HashMap _table;
   
     /**
      * The primary constructor for GenericCache.  It has default
  @@ -100,7 +100,7 @@
      */
     GenericCache(int capacity) {
       _numEntries = 0;
  -    _table    = new Hashtable(capacity);
  +    _table    = new HashMap(capacity);
       _cache    = new GenericCacheEntry[capacity];
   
       while(--capacity >= 0)
  @@ -120,7 +120,9 @@
       return null;
     }
   
  -  public final Enumeration keys() { return _table.keys(); }
  +  public final Iterator keys() {
  +    return _table.keySet().iterator();
  +  }
   
     /**
      * Returns the number of elements in the cache, not to be confused with
  
  
  

Mime
View raw message