HashSet
A mutable hash set containing one element from each group of equal elements.
Elements must retain stable equality and hash codes while stored. Nullable element types may store null, which hashes to zero. Generic floating equality coalesces NaNs and distinguishes positive and negative zero. User equality and hashing callbacks retain their effects and exceptions.
Iteration order is unspecified. Read-only Set aliases observe mutations. Adding a new element, removing an existing element or clearing a non-empty set invalidates existing iterators; adding a duplicate does not. Storage and traversal use ordinary Guest heap and instruction budgets.
Parameters
requested backing-map bucket capacity, not the initial size or an element limit.
Type Parameters
element type.
See also
Throws
if initialCapacity is negative or greater than 1,073,741,824.
Constructors
Properties
Functions
Checks whether this collection contains at least one element.
Creates a new mutable iterator over this set in unspecified order.
Appends non-null transformed elements to destination in iteration order.