abstract class WeakHashSet[A <: AnyRef](initialCapacity: Int, loadFactor: Double) extends MutableSet[A]
A HashSet where the elements are stored weakly. Elements in this set are eligible for GC if no other hard references are associated with them. Its primary use case is as a canonical reference identity holder (aka "hash-consing") via findEntryOrUpdate
This Set implementation cannot hold null. Any attempt to put a null in it will result in a NullPointerException
This set implementation is not in general thread safe without external concurrency control. However it behaves properly when GC concurrently collects elements in this set.
- Companion:
- object
Type members
Types
Value members
Concrete methods
The entry in the set such that isEqual(x, entry)
, or else null
.
The entry in the set such that isEqual(x, entry)
, or else null
.