From 1849be9c791b6fc23ca2a4a0906f4ae047eeb078 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Tue, 15 Sep 2009 05:56:27 +0000 Subject: [PATCH] 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 ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@815090 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/collections/MultiMap.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/java/org/apache/commons/collections/MultiMap.java b/src/java/org/apache/commons/collections/MultiMap.java index 0517faa9f..a3f831197 100644 --- a/src/java/org/apache/commons/collections/MultiMap.java +++ b/src/java/org/apache/commons/collections/MultiMap.java @@ -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 @@ import java.util.Map; * @author James Strachan * @author Stephen Colebourne */ -public interface MultiMap extends Map { +public interface MultiMap extends IterableMap { /** * Removes a specific value from map. @@ -66,7 +65,7 @@ public interface MultiMap extends Map { * @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 @@ public interface MultiMap extends Map { * @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 @@ public interface MultiMap extends Map { * @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 @@ public interface MultiMap extends Map { * @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 @@ public interface MultiMap extends Map { * * @return a collection view of the values contained in this map */ - Collection values(); + Collection values(); }