Package ghidra.util.datastruct

# Class WeakValueHashMap<K,V>

java.lang.Object
ghidra.util.datastruct.AbstractWeakValueMap<K,V>
ghidra.util.datastruct.WeakValueHashMap<K,V>

All Implemented Interfaces:
  `Map<K,V>`

public class WeakValueHashMap<K,V> extends AbstractWeakValueMap<K,V>
Class to provide a hash map with weak values.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ghidra.util.datastruct.AbstractWeakValueMap

  `AbstractWeakValueMap.GeneratedEntry, AbstractWeakValueMap.WeakValueRef<K,V>`

  ## Nested classes/interfaces inherited from interface java.util.Map

  `Map.Entry<K extends Object,V extends Object>`

- ## Field Summary

  ### Fields inherited from class ghidra.util.datastruct.AbstractWeakValueMap

  `refQueue`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WeakValueHashMap()`
  Constructs a new weak map
  `WeakValueHashMap(int initialSize)`
  Constructs a new weak map with the given initial size

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Map<K,AbstractWeakValueMap.WeakValueRef<K,V>>`
  `getRefMap()`
  Returns the backing map

  ### Methods inherited from class ghidra.util.datastruct.AbstractWeakValueMap

  `clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, processQueue, put, putAll, remove, size, values`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.util.Map

  `compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll`

- ## Constructor Details

  - ### WeakValueHashMap

    public WeakValueHashMap()
    Constructs a new weak map

  - ### WeakValueHashMap

    public WeakValueHashMap(int initialSize)
    Constructs a new weak map with the given initial size
    Parameters:
      `initialSize` - the initial size of the backing map

- ## Method Details

  - ### getRefMap

    protected Map<K,AbstractWeakValueMap.WeakValueRef<K,V>> getRefMap()
    Description copied from class: `AbstractWeakValueMap`
    Returns the backing map
    Specified by:
      `getRefMap` in class `AbstractWeakValueMap<K,V>`
    Returns:
      the map