public class ArraySetMultiMap<K,V>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
create |
static ArraySetMultiMap |
EMPTY |
protected java.util.Map<K,java.util.Set<V>> |
map |
Constructor and Description |
---|
ArraySetMultiMap() |
ArraySetMultiMap(boolean create) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(K key) |
protected java.util.Set<V> |
createSet() |
protected java.util.Set<V> |
emptySet() |
ArraySet<V> |
get(K key) |
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
boolean |
put(K key,
V val) |
boolean |
putAll(K key,
java.util.Collection<? extends V> vals) |
boolean |
remove(K key,
V val) |
java.util.Set<V> |
removeAll(K key) |
int |
size() |
java.lang.String |
toString() |
public static final ArraySetMultiMap EMPTY
protected final java.util.Map<K,java.util.Set<V>> map
protected final boolean create
public ArraySetMultiMap()
public ArraySetMultiMap(boolean create)
protected java.util.Set<V> createSet()
protected java.util.Set<V> emptySet()
public java.util.Set<V> removeAll(K key)
public boolean containsKey(K key)
containsKey
in interface MultiMap<K,V>
public java.lang.String toString()
public boolean putAll(K key, java.util.Collection<? extends V> vals)