[jboss-cvs] JBossCache/src/org/jboss/cache/util ...

Manik Surtani manik at jboss.org
Mon Mar 12 14:13:46 EDT 2007


  User: msurtani
  Date: 07/03/12 14:13:46

  Modified:    src/org/jboss/cache/util  MapCopy.java
  Log:
  JBCACHE-1005
  
  Revision  Changes    Path
  1.9       +11 -5     JBossCache/src/org/jboss/cache/util/MapCopy.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MapCopy.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/util/MapCopy.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- MapCopy.java	7 Feb 2007 22:06:42 -0000	1.8
  +++ MapCopy.java	12 Mar 2007 18:13:46 -0000	1.9
  @@ -4,6 +4,7 @@
   import java.io.Serializable;
   import java.util.AbstractMap;
   import java.util.AbstractSet;
  +import java.util.HashMap;
   import java.util.Iterator;
   import java.util.Map;
   import java.util.Set;
  @@ -14,8 +15,10 @@
    * <p/>
    * This map is strictly read-only, and map modification methods (as well as modifications over iterators) will throw
    * {@link UnsupportedOperationException}s.
  + *
  + * @author Elias Ross
    */
  -public class MapCopy<K, V> extends AbstractMap implements Serializable
  +public class MapCopy<K, V> extends AbstractMap<K, V> implements Serializable
   {
   
      private static final long serialVersionUID = -958813082188242956L;
  @@ -26,6 +29,8 @@
   
      /**
       * Copies the supplied map to an internal array.
  +    *
  +    * @param m map to copy
       */
      public MapCopy(Map<K, V> m)
      {
  @@ -40,8 +45,9 @@
         init();
      }
   
  -   public MapCopy() {
  -      this(new java.util.HashMap());
  +   public MapCopy()
  +   {
  +      this(new HashMap<K, V>());
      }
      
      private void init()
  @@ -81,7 +87,7 @@
      }
   
      @Override
  -   public Set entrySet()
  +   public Set<Map.Entry<K, V>> entrySet()
      {
         return entrySet;
      }
  
  
  



More information about the jboss-cvs-commits mailing list