Package io.deephaven.util.datastructures
Class WeakIdentityHashSet.Synchronized<TYPE>
java.lang.Object
io.deephaven.util.datastructures.WeakIdentityHashSet<TYPE>
io.deephaven.util.datastructures.WeakIdentityHashSet.Synchronized<TYPE>
- Enclosing class:
- WeakIdentityHashSet<TYPE>
Thread-safe implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.util.datastructures.WeakIdentityHashSet
WeakIdentityHashSet.Synchronized<TYPE>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Add a value to the set if its not already present.boolean
add
(TYPE value, @Nullable WeakReference<? extends TYPE> valueReference) Add a value to the set if its not already present.void
clear()
Clear the set.void
Invoke an action on each member of the set.
-
Constructor Details
-
Synchronized
public Synchronized()
-
-
Method Details
-
clear
public void clear()Description copied from class:WeakIdentityHashSet
Clear the set.- Overrides:
clear
in classWeakIdentityHashSet<TYPE>
-
add
Description copied from class:WeakIdentityHashSet
Add a value to the set if its not already present.- Overrides:
add
in classWeakIdentityHashSet<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 classWeakIdentityHashSet<TYPE>
- Parameters:
value
- The value to addvalueReference
- A re-usable WeakReference to value if already available, else null- Returns:
- True if the value was added to the set
-
forEach
Description copied from class:WeakIdentityHashSet
Invoke an action on each member of the set.- Overrides:
forEach
in classWeakIdentityHashSet<TYPE>
- Parameters:
action
- The action to invoke
-