Class MySpecialMultiMap<K,V>

java.lang.Object
soot.jimple.infoflow.collections.util.MySpecialMultiMap<K,V>
Type Parameters:
K - key type
V - value type

public class MySpecialMultiMap<K,V> extends Object
Special MultiMap that saves the first-added element seperated from the element added afterward
  • Field Details

  • Constructor Details

    • MySpecialMultiMap

      public MySpecialMultiMap()
  • Method Details

    • putAndGetFirst

      public V putAndGetFirst(K key, V value)
      Puts the value into the map and gets the first added value for this key
      Parameters:
      key - key
      value - value
      Returns:
      the first added value or null if the key had no mapping before
    • consumeOtherValuesAndRemove

      public void consumeOtherValuesAndRemove(K key, Consumer<V> consumer)
      Runs the consumer on all other values and removes the key value mapping
      Parameters:
      key - key
      consumer - function that runs on all other values
    • consumeOtherValues

      public void consumeOtherValues(K key, Consumer<V> consumer)
      Runs the consumer on all other values and removes the key value mapping
      Parameters:
      key - key
      consumer - function that runs on all other values
    • clear

      public void clear()
      Clears the mapping