utils

Home > @silence_zhpf/utils > HashSet > intersection

HashSet.intersection() method

该函数返回一个新的 HashSet,它包含当前 HashSet 和另一个 HashSet 的交集。

Signature:

intersection(other: HashSet<T>): HashSet<T>;

Parameters

Parameter Type Description
other HashSet<T> 另一个HashSet对象。

Returns:

HashSet<T>

两个HashSet的交集。