public interface IMultiMap<K,V>
Modifier and Type | Method and Description |
---|---|
boolean |
add(K key,
V value)
Precondition: the mapping key→value is not already in the map.
|
java.util.Set<V> |
getValues(K key)
Returns the values that the given key maps to.
|
java.util.Set<K> |
keySet()
Returns the set of keys in this map (the domain).
|
boolean |
remove(K key,
V value)
Precondition: the mapping key→value is in the map.
|
int |
size()
Returns the size of this map: the number of mappings.
|
java.lang.String |
toString()
Returns a String representation of this map.
|
boolean add(K key, V value)
key
- cannot be nullvalue
- cannot be nullboolean remove(K key, V value)
key
- cannot be nullvalue
- cannot be nulljava.util.Set<V> getValues(K key)
key
- cannot be nulljava.util.Set<K> keySet()
int size()
java.lang.String toString()
toString
in class java.lang.Object