klyn.collections.HashSetSync.union
method
public union(other as HashSetSync<T>) as HashSetSync<T>:
Description

Returns a new synchronized set containing all elements from this set and other.

Parameters
ParameterDescription
otherElements to merge with this set.
Returns

A new synchronized hash set containing the union.

Example
import klyn.collections

left = s:{1, 2, 3}
right = s:{3, 4}
merged = left.union(right)
assert merged.size == 4
assert 4 in merged