Package com.illumon.util.datastructures
Class WeakIdentityHashSet.Synchronized<TYPE>
java.lang.Object
com.illumon.util.datastructures.WeakIdentityHashSet<TYPE>
com.illumon.util.datastructures.WeakIdentityHashSet.Synchronized<TYPE>
- Enclosing class:
- WeakIdentityHashSet<TYPE>
Thread-safe implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.util.datastructures.WeakIdentityHashSet
WeakIdentityHashSet.Synchronized<TYPE> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd a value to the set if its not already present.booleanadd(TYPE value, WeakReference<? extends TYPE> valueReference) Add a value to the set if its not already present.voidclear()Clear the set.voidInvoke an action on each member of the set.
-
Constructor Details
-
Synchronized
public Synchronized()
-
-
Method Details
-
clear
public void clear()Description copied from class:WeakIdentityHashSetClear the set.- Overrides:
clearin classWeakIdentityHashSet<TYPE>
-
add
Description copied from class:WeakIdentityHashSetAdd a value to the set if its not already present.- Overrides:
addin classWeakIdentityHashSet<TYPE>- Parameters:
value- The value to add- Returns:
- True if the value was added to the set
-
add
Description copied from class:WeakIdentityHashSetAdd a value to the set if its not already present.- Overrides:
addin 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:WeakIdentityHashSetInvoke an action on each member of the set.- Overrides:
forEachin classWeakIdentityHashSet<TYPE>- Parameters:
action- The action to invoke
-