* Appends iterators for every stored bucket and leaf to support unordered * traversal across the entire structure. * @param {Iterator<T>[]} iterators list of iterators to append to * @returns {void}
(iterators)
| 251 | * @returns {void} |
| 252 | */ |
| 253 | _appendIterators(iterators) { |
| 254 | if (this._unsortedItems.size > 0) { |
| 255 | iterators.push(this._unsortedItems[Symbol.iterator]()); |
| 256 | } |
| 257 | for (const key of this._keys) { |
| 258 | const entry = this._map.get(key); |
| 259 | if (this._leaf) { |
| 260 | const leafEntry = /** @type {SortableSet<T>} */ (entry); |
| 261 | const iterator = leafEntry[Symbol.iterator](); |
| 262 | iterators.push(iterator); |
| 263 | } else { |
| 264 | const nodeEntry = |
| 265 | /** @type {LazyBucketSortedSet<T, K>} */ |
| 266 | (entry); |
| 267 | nodeEntry._appendIterators(iterators); |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Iterates over all stored items without imposing bucket sort order. |
no test coverage detected