Package ghidra.util.datastruct

# Class WeakDataStructureFactory

java.lang.Object
ghidra.util.datastruct.WeakDataStructureFactory

public class WeakDataStructureFactory extends Object
Factory for creating containers to use in various threading environments Other non-weak listeners:

- `ConcurrentListenerSet`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WeakDataStructureFactory()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T> WeakSet<T>`
  `createCopyOnReadWeakSet()`
  Use when mutations outweigh iterations.
  `static <T> WeakSet<T>`
  `createCopyOnWriteWeakSet()`
  Use when iterations outweigh mutations.
  `static <T> WeakSet<T>`
  `createSingleThreadAccessWeakSet()`
  Use when all access are on a single thread, such as the Swing thread.

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

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

- ## Constructor Details

  - ### WeakDataStructureFactory

    public WeakDataStructureFactory()

- ## Method Details

  - ### createSingleThreadAccessWeakSet

    public static <T> WeakSet<T> createSingleThreadAccessWeakSet()
    Use when all access are on a single thread, such as the Swing thread.
    Returns:
      a new WeakSet

  - ### createCopyOnReadWeakSet

    public static <T> WeakSet<T> createCopyOnReadWeakSet()
    Use when mutations outweigh iterations.
    Returns:
      a new WeakSet
    See Also:
      - `CopyOnReadWeakSet`

  - ### createCopyOnWriteWeakSet

    public static <T> WeakSet<T> createCopyOnWriteWeakSet()
    Use when iterations outweigh mutations.
    Returns:
      a new WeakSet
    See Also:
      - `CopyOnWriteWeakSet`