edu.washington.cs.knowitall.commonlib
Class MultiMap<E,F>

java.lang.Object
  extended by edu.washington.cs.knowitall.commonlib.MultiMap<E,F>
All Implemented Interfaces:
Map<E,Collection<F>>

public class MultiMap<E,F>
extends Object
implements Map<E,Collection<F>>


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
MultiMap()
           
MultiMap(Map<E,Collection<F>> map)
           
MultiMap(Map<E,Collection<F>> map, Factory<Collection<F>> factory)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set<Map.Entry<E,Collection<F>>> entrySet()
           
 Collection<F> get(Object key)
           
 boolean isEmpty()
           
 Set<E> keySet()
           
 Collection<F> put(E key, Collection<F> value)
           
 Collection<F> put(E key, F value)
           
 void putAll(Map<? extends E,? extends Collection<F>> m)
           
 Collection<F> remove(Object key)
           
 int size()
           
 Collection<Collection<F>> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

MultiMap

public MultiMap(Map<E,Collection<F>> map,
                Factory<Collection<F>> factory)

MultiMap

public MultiMap(Map<E,Collection<F>> map)

MultiMap

public MultiMap()
Method Detail

size

public int size()
Specified by:
size in interface Map<E,Collection<F>>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<E,Collection<F>>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<E,Collection<F>>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<E,Collection<F>>

get

public Collection<F> get(Object key)
Specified by:
get in interface Map<E,Collection<F>>

put

public Collection<F> put(E key,
                         Collection<F> value)
Specified by:
put in interface Map<E,Collection<F>>

put

public Collection<F> put(E key,
                         F value)

remove

public Collection<F> remove(Object key)
Specified by:
remove in interface Map<E,Collection<F>>

putAll

public void putAll(Map<? extends E,? extends Collection<F>> m)
Specified by:
putAll in interface Map<E,Collection<F>>

clear

public void clear()
Specified by:
clear in interface Map<E,Collection<F>>

keySet

public Set<E> keySet()
Specified by:
keySet in interface Map<E,Collection<F>>

values

public Collection<Collection<F>> values()
Specified by:
values in interface Map<E,Collection<F>>

entrySet

public Set<Map.Entry<E,Collection<F>>> entrySet()
Specified by:
entrySet in interface Map<E,Collection<F>>


Copyright © 2012 University of Washington CSE. All Rights Reserved.