Class WeakIdentityHashSet.Synchronized<TYPE>

java.lang.Object
io.deephaven.util.datastructures.WeakIdentityHashSet<TYPE>
io.deephaven.util.datastructures.WeakIdentityHashSet.Synchronized<TYPE>
Enclosing class:
WeakIdentityHashSet<TYPE>

public static class WeakIdentityHashSet.Synchronized<TYPE> extends WeakIdentityHashSet<TYPE>
Thread-safe implementation.
  • Constructor Details

    • Synchronized

      public Synchronized()
  • Method Details

    • clear

      public void clear()
      Description copied from class: WeakIdentityHashSet
      Clear the set.
      Overrides:
      clear in class WeakIdentityHashSet<TYPE>
    • add

      public boolean add(@NotNull TYPE value)
      Description copied from class: WeakIdentityHashSet
      Add a value to the set if its not already present.
      Overrides:
      add in class WeakIdentityHashSet<TYPE>
      Parameters:
      value - The value to add
      Returns:
      True if the value was added to the set
    • add

      public boolean add(@NotNull TYPE value, @Nullable @Nullable WeakReference<? extends TYPE> valueReference)
      Description copied from class: WeakIdentityHashSet
      Add a value to the set if its not already present.
      Overrides:
      add in class WeakIdentityHashSet<TYPE>
      Parameters:
      value - The value to add
      valueReference - A re-usable WeakReference to value if already available, else null
      Returns:
      True if the value was added to the set
    • forEach

      public void forEach(@NotNull @NotNull Consumer<? super TYPE> action)
      Description copied from class: WeakIdentityHashSet
      Invoke an action on each member of the set.
      Overrides:
      forEach in class WeakIdentityHashSet<TYPE>
      Parameters:
      action - The action to invoke