Home > @silence_zhpf/utils > HashSet > has
此函数检查集合中是否存在指定的值。
Signature:
has(v: T): boolean;
Parameter | Type | Description |
---|---|---|
v | T | v 是指定的值,用作检查它是否存在于HashSet 中。 |
Returns:
boolean
has
方法返回一个布尔值,HashSet
中是否包含值 v
。如果集合中存在“v”,该方法将返回“true”,否则返回“false”。