public interface SetValuedMap<K,V> extends MultiValuedMap<K ,V>
A SetValuedMap is a Map with slightly different semantics:
| Modifier and Type | Method and Description |
|---|---|
Set |
get(K key)
Gets the set of values associated with the specified key.
|
Set |
remove(Object
Removes all values associated with the specified key.
|
asMap, clear, containsKey, containsMapping, containsValue, entries, isEmpty, keys, keySet, mapIterator, put, putAll, putAll, putAll, removeMapping, size, valuesSet<V> get(K key)
Implementations typically return an empty Set if no values have been mapped to the key.
get in interface
MultiValuedMap<K,V>
key - the key to retrieve
Set of values, implementations should return an empty
Set for no mapping
NullPointerException - if the key is null and null keys are invalid
Set<V> remove(Object key)
The returned set may be modifiable, but updates will not be propagated to this set-valued map. In case no mapping was stored for the specified key, an empty, unmodifiable set will be returned.
remove in interface
MultiValuedMap<K,V>
key - the key to remove values from
Set of values removed, implementations should return null for no mapping found, but may return an empty collection
UnsupportedOperationException - if the map is unmodifiable
NullPointerException - if the key is null and null keys are invalid