Key - the keys of the multimapValue - the values of the multimappublic 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> |
getValues(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, waitclear, isEmpty, keySet, removecompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putAll, putIfAbsent, replace, replace, replaceAllpublic 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> getValues(Object key)
key - the key for which to retrieve the associated valuesnull if no value us associatedCopyright © 2011–2024 Live Ontologies Project. All rights reserved.