Key - Value - public class MultiMap<Key,Value> extends Object implements Serializable
| Constructor and Description |
|---|
MultiMap() |
MultiMap(boolean threadsafe) |
MultiMap(boolean threadsafe,
boolean usesets) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
contains(Key k,
Value v) |
boolean |
containsKey(Key k) |
boolean |
containsValue(Value v) |
protected Collection<Value> |
createCollection() |
Collection<Value> |
get(Key key)
returns a mutable set of values connected to the key; if no value is
connected, returns an immutable empty set
|
Set<Value> |
getAllValues() |
boolean |
isValueSetsEqual() |
Set<Key> |
keySet() |
boolean |
put(Key key,
Value value) |
void |
putAll(Key k,
Collection<Value> v) |
void |
putAll(MultiMap<Key,Value> otherMap) |
boolean |
remove(Key key)
removes the set of values connected to the key
|
boolean |
remove(Key key,
Value value)
removes the value connected to the key; if there is more than one value
connected to the key, only one is removed
|
void |
setEntry(Key key,
Collection<Value> values) |
int |
size() |
String |
toString() |
public MultiMap()
public MultiMap(boolean threadsafe)
public MultiMap(boolean threadsafe,
boolean usesets)
protected Collection<Value> createCollection()
public void setEntry(Key key, Collection<Value> values)
key - values - public Collection<Value> get(Key key)
key - public boolean remove(Key key)
key - public boolean remove(Key key, Value value)
key - value - public int size()
public boolean contains(Key k, Value v)
k - v - public boolean containsKey(Key k)
k - public boolean containsValue(Value v)
v - public void clear()
public void putAll(Key k, Collection<Value> v)
public boolean isValueSetsEqual()
Copyright © 2013 The University of Manchester. All Rights Reserved.