Class MyConcurrentHashMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,V>
soot.jimple.infoflow.collect.MyConcurrentHashMap<K,V>
All Implemented Interfaces:
Serializable, ConcurrentMap<K,V>, Map<K,V>

public class MyConcurrentHashMap<K,V> extends ConcurrentHashMap<K,V>
See Also:
  • Constructor Details

    • MyConcurrentHashMap

      public MyConcurrentHashMap()
  • Method Details

    • putIfAbsentElseGet

      public V putIfAbsentElseGet(K key, V value)
      Puts the new key/value-pair if no mapping for the given key was in the in the map before, otherwise it returns the existing mapping.
      Parameters:
      key - The key to check and put if it is not already in the map
      value - The value to put
      Returns:
      The old value if one was present in the map for the given key, otherwise, the newly registered value
    • putIfAbsentElseGet

      public V putIfAbsentElseGet(K key, MyConcurrentHashMap.IValueFactory<V> valueFactory)
      Puts the new key/value-pair if no mapping for the given key was in the in the map before, otherwise it returns the existing mapping.
      Parameters:
      key - The key to check and put if it is not already in the map
      valueFactory - The factory that creates the value to put into the map on demand
      Returns:
      The old value if one was present in the map for the given key, otherwise, the newly registered value