Package pascal.taie.util.collection
Class MapMultiMapTwoKeyMultiMap<K1,K2,V>
java.lang.Object
pascal.taie.util.collection.AbstractTwoKeyMultiMap<K1,K2,V>
pascal.taie.util.collection.MapMultiMapTwoKeyMultiMap<K1,K2,V>
- All Implemented Interfaces:
Serializable
,TwoKeyMultiMap<K1,
K2, V>
Implements
TwoKeyMultiMap
as map of multimaps.- See Also:
-
Field Summary
Fields inherited from class pascal.taie.util.collection.AbstractTwoKeyMultiMap
NULL_KEY, NULL_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all the mappings from this map.boolean
boolean
containsKey
(K1 key1) boolean
containsKey
(K1 key1, K2 key2) boolean
containsValue
(V value) protected Iterator<TwoKeyMap.Entry<K1,
K2, V>> int
hashCode()
boolean
Stores a key1-key2-value triple in this two-key multimap.boolean
Removes a single key1-key2-value triple from this two-key multimap, if it exists.boolean
Removes all values associated with the two-key pair.int
size()
Methods inherited from class pascal.taie.util.collection.AbstractTwoKeyMultiMap
entrySet, equals, isEmpty, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface pascal.taie.util.collection.TwoKeyMultiMap
forEach
-
Constructor Details
-
MapMultiMapTwoKeyMultiMap
-
-
Method Details
-
contains
- Returns:
true
if given key1-key2-value mapping is contained in this two-key multimap.
-
containsKey
- Returns:
true
if this two-key multimap contains the mapping withkey1
as the first key andkey2
as the second key.
-
containsKey
- Returns:
true
if this two-key multimap contains at least one mapping withkey1
as the first key.
-
containsValue
- Returns:
true
if this two-key multimap contains at least one mapping withvalue
as the value. Note that this operation may be slow compared toTwoKeyMultiMap.containsKey(Object)
.
-
get
- Returns:
- an unmodifiable view of the values associated with given keys in this multimap, if the two-key pair is absent; otherwise, returns an empty set.
-
get
- Returns:
- an unmodifiable view of the values associated with given key in this two-key multimap, if the key is absent; otherwise, returns an empty multimap.
-
put
Description copied from interface:TwoKeyMultiMap
Stores a key1-key2-value triple in this two-key multimap.- Returns:
true
if this two-key multimap changed.
-
remove
Description copied from interface:TwoKeyMultiMap
Removes a single key1-key2-value triple from this two-key multimap, if it exists.- Returns:
true
if the two-key multimap changed
-
removeAll
Description copied from interface:TwoKeyMultiMap
Removes all values associated with the two-key pair.- Returns:
true
if the multimap changed.
-
entryIterator
- Specified by:
entryIterator
in classAbstractTwoKeyMultiMap<K1,
K2, V>
-
twoKeySet
- Returns:
- an unmodifiable view of all distinct two-key pairs
contained in this two-key multimap. Note that the result contains
a two-key pair if and only if this map maps that key pair to
at least one non-
null
value.
-
clear
public void clear()Description copied from interface:TwoKeyMultiMap
Removes all the mappings from this map. The map will be empty after this call returns. -
size
public int size()- Returns:
- the number of key1-key2-value mappings in this map.
-
hashCode
public int hashCode()
-