Class MySpecialMultiMap<K,V>
java.lang.Object
soot.jimple.infoflow.collections.util.MySpecialMultiMap<K,V>
- Type Parameters:
K- key typeV- value type
Special MultiMap that saves the first-added element seperated from the element added afterward
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classSet that saves the first value separatelyprotected static classDummy set that prevents any reuse -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentMap<K,MySpecialMultiMap.MySet<V>> protected MySpecialMultiMap.NotReusableSet<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the mappingvoidconsumeOtherValues(K key, Consumer<V> consumer) Runs the consumer on all other values and removes the key value mappingvoidconsumeOtherValuesAndRemove(K key, Consumer<V> consumer) Runs the consumer on all other values and removes the key value mappingputAndGetFirst(K key, V value) Puts the value into the map and gets the first added value for this key
-
Field Details
-
notReusableSet
-
m
-
-
Constructor Details
-
MySpecialMultiMap
public MySpecialMultiMap()
-
-
Method Details
-
putAndGetFirst
Puts the value into the map and gets the first added value for this key- Parameters:
key- keyvalue- value- Returns:
- the first added value or null if the key had no mapping before
-
consumeOtherValuesAndRemove
Runs the consumer on all other values and removes the key value mapping- Parameters:
key- keyconsumer- function that runs on all other values
-
consumeOtherValues
Runs the consumer on all other values and removes the key value mapping- Parameters:
key- keyconsumer- function that runs on all other values
-
clear
public void clear()Clears the mapping
-