commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1026255 - in /commons/proper/collections/trunk/src/test/org/apache/commons/collections/map: EmptyMapMutator.java TestCompositeMap.java
Date Fri, 22 Oct 2010 09:00:38 GMT
Author: sebb
Date: Fri Oct 22 09:00:38 2010
New Revision: 1026255

URL: http://svn.apache.org/viewvc?rev=1026255&view=rev
Log:
Generics

Modified:
    commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/EmptyMapMutator.java
    commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestCompositeMap.java

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/EmptyMapMutator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/EmptyMapMutator.java?rev=1026255&r1=1026254&r2=1026255&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/EmptyMapMutator.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/EmptyMapMutator.java
Fri Oct 22 09:00:38 2010
@@ -24,23 +24,23 @@ import java.util.Collection;
  * the class has to be separate of TestCompositeMap, else the test 
  * class also has to be serialized. 
  */
-class EmptyMapMutator implements CompositeMap.MapMutator {
+class EmptyMapMutator<K,V> implements CompositeMap.MapMutator<K,V> {
     /** Serialization version */
     private static final long serialVersionUID = -2729718980002476794L;
 
-    public void resolveCollision(CompositeMap composite,
-    Map existing,
-    Map added,
-    Collection intersect) {
+    public void resolveCollision(CompositeMap<K,V> composite,
+    Map<K,V> existing,
+    Map<K,V> added,
+    Collection<K> intersect) {
         // Do nothing
     }
     
-    public Object put(CompositeMap map, Map[] composited, Object key, Object value) {
+    public V put(CompositeMap<K, V> map, Map<K, V>[] composited, K key, V value)
{
         return composited[0].put(key, value);
     }
     
-    public void putAll(CompositeMap map, Map[] composited, Map t) {
+    public void putAll(CompositeMap<K, V> map, Map<K, V>[] composited, Map<?
extends K, ? extends V> t) {
         composited[0].putAll(t);
     }
-    
+
 }

Modified: commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestCompositeMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestCompositeMap.java?rev=1026255&r1=1026254&r2=1026255&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestCompositeMap.java
(original)
+++ commons/proper/collections/trunk/src/test/org/apache/commons/collections/map/TestCompositeMap.java
Fri Oct 22 09:00:38 2010
@@ -49,7 +49,7 @@ public class TestCompositeMap<K, V> exte
     public CompositeMap<K, V> makeObject() {
         CompositeMap<K, V> map = new CompositeMap<K, V>();
         map.addComposited(new HashMap<K, V>());
-        map.setMutator( new EmptyMapMutator() );
+        map.setMutator( new EmptyMapMutator<K, V>() );
         return map;
     }
     



Mime
View raw message