You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2003/12/03 20:03:50 UTC

cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/map Flat3Map.java

scolebourne    2003/12/03 11:03:50

  Modified:    collections/src/java/org/apache/commons/collections/map
                        Flat3Map.java
  Log:
  Change to use HashedMap instead of HashMap
  
  Revision  Changes    Path
  1.6       +6 -8      jakarta-commons/collections/src/java/org/apache/commons/collections/map/Flat3Map.java
  
  Index: Flat3Map.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/map/Flat3Map.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Flat3Map.java	2 Dec 2003 23:51:50 -0000	1.5
  +++ Flat3Map.java	3 Dec 2003 19:03:50 -0000	1.6
  @@ -60,7 +60,6 @@
   import java.util.AbstractCollection;
   import java.util.AbstractSet;
   import java.util.Collection;
  -import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
   import java.util.NoSuchElementException;
  @@ -70,7 +69,6 @@
   import org.apache.commons.collections.IteratorUtils;
   import org.apache.commons.collections.MapIterator;
   import org.apache.commons.collections.ResettableIterator;
  -import org.apache.commons.collections.iterators.EntrySetMapIterator;
   
   /**
    * A <code>Map</code> implementation that stores data in simple fields until
  @@ -127,7 +125,7 @@
       /** Value, used while in flat mode */
       private Object iValue3;
       /** Map, used while in delegate mode */
  -    private HashMap iMap;
  +    private HashedMap iMap;
   
       /**
        * Constructor.
  @@ -388,7 +386,7 @@
        * Converts the flat map data to a HashMap.
        */
       private void convertToMap() {
  -        iMap = new HashMap();
  +        iMap = new HashedMap();
           switch (iSize) {  // drop through
               case 3:
                   iMap.put(iKey3, iValue3);
  @@ -578,13 +576,13 @@
        * A MapIterator returns the keys in the map. It also provides convenient
        * methods to get the key and value, and set the value.
        * It avoids the need to create an entrySet/keySet/values object.
  -     * It also avoids creating the Mep Entry object.
  +     * It also avoids creating the Map Entry object.
        * 
        * @return the map iterator
        */
       public MapIterator mapIterator() {
           if (iMap != null) {
  -            return new EntrySetMapIterator(this);
  +            return iMap.mapIterator();
           }
           if (iSize == 0) {
               return IteratorUtils.EMPTY_MAP_ITERATOR;
  
  
  

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