* Checks whether the exact tuple key has a stored value. * @param {K} args tuple * @returns {boolean} true, if the tuple is in the Set
(...args)
| 87 | * @returns {boolean} true, if the tuple is in the Set |
| 88 | */ |
| 89 | has(...args) { |
| 90 | /** @type {WeakTupleMap<K, V> | undefined} */ |
| 91 | let node = this; |
| 92 | for (let i = 0; i < args.length; i++) { |
| 93 | node = node._peek(/** @type {ArrayElement<K>} */ (args[i])); |
| 94 | if (node === undefined) return false; |
| 95 | } |
| 96 | return node._hasValue(); |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Returns the value stored for the exact tuple key, if any. |