Buffer

cispy/buffers~ Buffer

Source:

The base for buffer classes, containing the common functionality between all of them. The only properties that actually vary between buffer types are full (whether or not the buffer is full) and add (because different buffers have different behavior when something is added to a full buffer).

These buffers are each backed by a Queue.

Members

(readonly) count :number

Source:

The number of items currently being stored by the buffer.

Type:
  • number

(readonly) queue :module:cispy/buffers~Queue

Source:

The queue that backs this buffer.

Type:

(readonly) size :number

Source:

The size of the buffer.

This is not the number of elements in the buffer; it is the number of items that can be stored without the buffer overflowing. It is static and is set at creation time.

Type:
  • number

Methods

remove() → {*}

Source:

Removes and returns the oldest item in the buffer.

Returns:

The oldest item in the buffer.

Type
*