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
This commit is contained in:
parent
8749df8fa8
commit
1849be9c79
|
@ -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<K, V> extends IterableMap<K, Object> {
|
||||
|
||||
/**
|
||||
* 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<Object> values();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue