Module me.sbasalaev.common
Package me.sbasalaev.collection
Interface MultimapMutator<K,V,C extends Collection<V>>
- Type Parameters:
K- type of the keys of this multimap.V- type of the values of this multimap.C- type of the collections of values corresponding to a single key.
- All Known Implementing Classes:
MutableListMultimap,MutableMap,MutableSetMultimap
public interface MultimapMutator<K,V,C extends Collection<V>>
Common mutating methods for all mutable multimaps.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanPuts key-value pair in this multimap.default booleanPuts key-value pair in this multimap.voidclear()Removes all entries from this multimap.booleanremoveEntry(K key, V value) Removes a single entry from this multimap.Removes the key and all associated values from this multimap.
-
Method Details
-
add
Puts key-value pair in this multimap.- Returns:
- true iff the multimap was modified as a result of this operation.
-
add
Puts key-value pair in this multimap.- Returns:
- true iff the multimap was modified as a result of this operation.
-
removeKey
Removes the key and all associated values from this multimap.- Returns:
- the collection of elements that was previously associated with given key.
-
removeEntry
Removes a single entry from this multimap.- Returns:
trueif the collection is changed as the result of this operation,falseotherwise.
-
clear
void clear()Removes all entries from this multimap.
-