Class CopyOnReadWeakSet<T>

java.lang.Object
ghidra.util.datastruct.WeakSet<T>
ghidra.util.datastruct.CopyOnReadWeakSet<T>
All Implemented Interfaces:
Iterable<T>

public class CopyOnReadWeakSet<T> extends WeakSet<T>
  • Constructor Details

    • CopyOnReadWeakSet

      protected CopyOnReadWeakSet()
  • Method Details

    • add

      public void add(T t)
      Add the given object to the set.
      Specified by:
      add in class WeakSet<T>
      Parameters:
      t - the object to add
    • remove

      public void remove(T t)
      Remove the given object from the data structure
      Specified by:
      remove in class WeakSet<T>
      Parameters:
      t - the object to remove
    • clear

      public void clear()
      Remove all elements from this data structure
      Specified by:
      clear in class WeakSet<T>
    • iterator

      public Iterator<T> iterator()
      Returns an iterator over the elements in this data structure.
    • values

      public Collection<T> values()
      Description copied from class: WeakSet
      Returns a Collection view of this set. The returned Collection is backed by this set.
      Specified by:
      values in class WeakSet<T>
      Returns:
      a Collection view of this set. The returned Collection is backed by this set.
    • isEmpty

      public boolean isEmpty()
      Description copied from class: WeakSet
      Return whether this data structure is empty
      Specified by:
      isEmpty in class WeakSet<T>
      Returns:
      whether this data structure is empty
    • size

      public int size()
      Description copied from class: WeakSet
      Return the number of objects contained within this data structure
      Specified by:
      size in class WeakSet<T>
      Returns:
      the size
    • contains

      public boolean contains(T t)
      Description copied from class: WeakSet
      Returns true if the given object is in this data structure
      Specified by:
      contains in class WeakSet<T>
      Parameters:
      t - the object
      Returns:
      true if the given object is in this data structure