Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
contains(A key,
B value)
Returns true if the multimap contains a value for a key.
|
boolean |
containsKey(A key) |
Set<Map.Entry<A,Set<B>>> |
entrySet() |
Set<B> |
get(A key)
Returns the Set associated with the given key.
|
Set<B> |
getValues(A key)
Like get, but returns an empty Set if nothing has been mapped to the key.
|
boolean |
isEmpty() |
Set<A> |
keySet()
Get the keySet.
|
void |
put(A key,
B value)
Map a key to a value.
|
void |
putAll(A key,
Collection<B> values)
Map the key to all the given values.
|
void |
putVoid(A key)
Put a key that maps to nothing.
|
Set<B> |
remove(A key)
Removes all mappings for a certain key.
|
boolean |
remove(A key,
B value)
Removes a cerain key=value mapping.
|
int |
size()
Returns the number of keys.
|
String |
toString() |
Collection<Set<B>> |
values()
Returns a collection of all value sets.
|
public void put(A key, B value)
public void putVoid(A key)
public void putAll(A key, Collection<B> values)
public Set<B> get(A key)
public Set<B> getValues(A key)
public boolean isEmpty()
public boolean containsKey(A key)
public boolean contains(A key, B value)
key
- The keyvalue
- The valuepublic void clear()
public int size()
public Collection<Set<B>> values()
public boolean remove(A key, B value)