Key - Value - public abstract class AbstractHashMultimap<Key,Value> extends ArrayHashMap<Key,Collection<Value>> implements Multimap<Key,Value>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>keys, size, values| Constructor and Description |
|---|
AbstractHashMultimap() |
AbstractHashMultimap(int i) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Key key,
Value value)
Stores the key-value pair in this multimap
|
boolean |
contains(Key key,
Value value)
Tests if the key-value pair occurs in this multimap
|
Collection<Value> |
get(Object key)
Returns the collection of values associated with the given key in this
multimap
|
Collection<Value> |
getOld(Object key) |
protected abstract Collection<Value> |
newRecord() |
boolean |
remove(Object key,
Object value)
Removes the key-value pair from this multimap
|
clear, containsKey, containsValue, entrySet, isEmpty, keySet, put, remove, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitpublic AbstractHashMultimap()
public AbstractHashMultimap(int i)
protected abstract Collection<Value> newRecord()
public boolean contains(Key key, Value value)
Multimappublic boolean add(Key key, Value value)
Multimappublic Collection<Value> get(Object key)
Multimapget in interface Map<Key,Collection<Value>>get in interface Multimap<Key,Value>get in class ArrayHashMap<Key,Collection<Value>>key - the key for which to retrieve the valuespublic Collection<Value> getOld(Object key)
Copyright © 2011-2015 Department of Computer Science, University of Oxford. All Rights Reserved.