utils

Home > @silence_zhpf/utils > HashSet > has

HashSet.has() method

此函数检查集合中是否存在指定的值。

Signature:

has(v: T): boolean;

Parameters

Parameter Type Description
v T v 是指定的值,用作检查它是否存在于HashSet中。

Returns:

boolean

has 方法返回一个布尔值,HashSet中是否包含值 v。如果集合中存在“v”,该方法将返回“true”,否则返回“false”。