| | |
| | | } |
| | | |
| | | /** |
| | | * Returns itself. |
| | | * @param {T} value value to add to set |
| | | * @returns {this} returns itself |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns true if value existed in set, false otherwise. |
| | | * @param {T} value value to delete |
| | | * @returns {boolean} true if value existed in set, false otherwise |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Describes how this clear operation behaves. |
| | | * @returns {void} |
| | | */ |
| | | clear() { |
| | |
| | | return; |
| | | } |
| | | |
| | | /** @type {T[]} */ |
| | | const sortedArray = [...this].sort(sortFn); |
| | | super.clear(); |
| | | for (let i = 0; i < sortedArray.length; i += 1) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Invalidates the cached state associated with this value. |
| | | * @private |
| | | * @returns {void} |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Invalidate ordered cache. |
| | | * @private |
| | | * @returns {void} |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the raw array. |
| | | * @returns {T[]} the raw array |
| | | */ |
| | | toJSON() { |