The initial capacity.
The resize factor. When the buffer is full, it will resize to resizeFactor * capacity.
Private
_capacityThe initial capacity.
Private
backPrivate
bufferPrivate
frontPrivate
Readonly
resizeThe resize factor. When the buffer is full, it will resize to resizeFactor * capacity.
Returns the current capacity of this ArrayDeque.
Returns the size of this ArrayDeque.
Returns the top element of this Stack, or undefined if empty.
Clears this ArrayDeque.
Returns the first item of this Queue, or undefined if empty.
Private
isPrivate
isRemoves and returns the last element of this ArrayDeque, or undefined if empty.
Adds an element to the end of this ArrayDeque.
Resizes this ArrayDeque to the new capacity. By default, it expands to 2x the current capacity. Does nothing if new capacity is less than current size.
Removes and returns the first element of this ArrayDeque, or undefined if empty.
Adds an element to the beginning of this ArrayDeque.
Generated using TypeDoc
A double-ended queue using a circular buffer.