You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2009/09/15 07:56:28 UTC

svn commit: r815090 - /commons/proper/collections/trunk/src/java/org/apache/commons/collections/MultiMap.java

Author: bayard
Date: Tue Sep 15 05:56:27 2009
New Revision: 815090

URL: http://svn.apache.org/viewvc?rev=815090&view=rev
Log:
Merging from -r468106:814127 of collections_jdk5_branch - namely where this code was generified; mostly in r738956.

Also see the following revisions:

    ------------------------------------------------------------------------
    r740150 | mbenson | 2009-02-02 15:24:00 -0800 (Mon, 02 Feb 2009) | 1 line
    
    make all [collections] maps implement IterableMap
    ------------------------------------------------------------------------

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/MultiMap.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/MultiMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/MultiMap.java?rev=815090&r1=815089&r2=815090&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/MultiMap.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/MultiMap.java Tue Sep 15 05:56:27 2009
@@ -17,7 +17,6 @@
 package org.apache.commons.collections;
 
 import java.util.Collection;
-import java.util.Map;
 
 /** 
  * Defines a map that holds a collection of values against each key.
@@ -47,7 +46,7 @@
  * @author James Strachan
  * @author Stephen Colebourne
  */
-public interface MultiMap extends Map {
+public interface MultiMap<K, V> extends IterableMap<K, Object> {
 
     /**
      * Removes a specific value from map.
@@ -66,7 +65,7 @@
      * @throws ClassCastException if the key or value is of an invalid type
      * @throws NullPointerException if the key or value is null and null is invalid
      */
-    public Object remove(Object key, Object item);
+    public V remove(K key, V item);
 
     //-----------------------------------------------------------------------
     /**
@@ -98,7 +97,7 @@
      * @throws ClassCastException if the key is of an invalid type
      * @throws NullPointerException if the key is null and null keys are invalid
      */
-    Object get(Object key);
+    Object get(K key);
 
     /**
      * Checks whether the map contains the value specified.
@@ -129,7 +128,7 @@
      * @throws NullPointerException if the key or value is null and null is invalid
      * @throws IllegalArgumentException if the key or value is invalid
      */
-    Object put(Object key, Object value);
+    Object put(K key, Object value);
 
     /**
      * Removes all values associated with the specified key.
@@ -144,7 +143,7 @@
      * @throws ClassCastException if the key is of an invalid type
      * @throws NullPointerException if the key is null and null keys are invalid
      */
-    Object remove(Object key);
+    Object remove(K key);
 
     /**
      * Gets a collection containing all the values in the map.
@@ -155,6 +154,6 @@
      *
      * @return a collection view of the values contained in this map
      */
-    Collection values();
+    Collection<Object> values();
 
 }