- All Implemented Interfaces:
Iterable<T>
public final class ConcurrentSet<T>
extends Object
implements Iterable<T>
This uses a [ConcurrentHashMap] as its base. We store
the data in the keys only. We provide some syntactic sugar
so this seems similar to using a Set.
This is a thread-safe data structure.
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ConcurrentSet
public ConcurrentSet()
-
Method Details
-
add
public void add(T element)
-
remove
public void remove(T element)
-
-