This class implements the
interface, and serves as a zero-garbage memory-efficient replacement
for the JRE's
This class may be preferable to the JRE-provided HashSet for high-frequency caches with short-lived entries, as it is
based on the
class with all the advantages that advertises in terms of reduced memory churn
and garbage generation.
In addition, this class has a much smaller memory footprint. Whereas the JDK's HashSet uses a full HashMap with Entry
objects to store its keys, this class uses a special mode of the already much slimmer GreyBase HashedMapIntValue class,
which avoid allocating any storage for its unused Values.
Like the JRE's
HashSet, this class implements all optional
Beware that this class is single-threaded and non-reentrant.