* Delete the specified element. * @param element - The element to be deleted
(element: T)
| 46 | * @param element - The element to be deleted |
| 47 | */ |
| 48 | delete(element: T): void { |
| 49 | // @todo: It can be optimized for custom binary search and other algorithms, currently this._elements>=this.length wastes performance. |
| 50 | const index = this._elements.indexOf(element); |
| 51 | this.deleteByIndex(index); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Set the element at the specified index. |
no test coverage detected