+ public empty (): boolean {
+ return this.size === 0
+ }
+
+ /**
+ * Checks whether the buffer is full.
+ *
+ * @returns Whether the buffer is full.
+ */
+ public full (): boolean {
+ return this.size === this.items.length
+ }
+
+ /**
+ * Puts number into buffer.
+ *
+ * @param number - Number to put into buffer.
+ */
+ public put (number: number): void {
+ this.items[this.writeIdx] = number