- Type Parameters:
T - the type of the elements stored in this set
public class ConcurrentLightHashSet<T>
extends Object
Implements a hash set that is concurrent, backed by a concurrent hash map, and memory efficient.
The memory efficiency comes from the fact that the map is initialized only when the set contains
more than one element. When it contains a single element it is simply stored in a field. When the
set is empty the field is null. In situations where is likely that the set will contain no or
only one element there is no memory overhead incurred by allocating the map.