* Adds an item to the end of the buffer.
(value: T)
| 102 | * Adds an item to the end of the buffer. |
| 103 | */ |
| 104 | push(value: T) { |
| 105 | if (this.isFull()) { |
| 106 | throw new RangeError('Ring buffer is full.'); |
| 107 | } |
| 108 | this.set(this.end, value); |
| 109 | this.end = this.wrap(this.end + 1); |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Adds many items to the end of the buffer, in order. |
no test coverage detected