goog.structs.CircularBuffer |
opt_maxSize
: number=
The maximum size of the buffer.
|
![]()
Adds an item to the buffer. May remove the oldest item if the buffer is at
max size.
Arguments:
Returns: T | undefined
The removed old item, if the buffer is at max size.
Return undefined, otherwise.
|
code » | |||
![]()
Empties the current buffer.
|
code » | |||
Whether the buffer contains the key/index.
|
code » | |||
Whether the buffer contains the given value.
Arguments:
Returns: boolean
Whether the buffer contains the given value.
|
code » | |||
![]()
Returns the item at the specified index.
Arguments:
Returns: T
The item at the specified index.
|
code » | |||
Returns the current number of items in the buffer.
Returns: number
The current number of items in the buffer.
|
code » | |||
No description.
|
code » | |||
![]()
Returns the last item inserted into the buffer.
Returns: T | null
The last item inserted into the buffer,
or null if the buffer is empty.
|
code » | |||
Returns the newest values in the buffer up to
count .
|
code » | |||
No description.
|
code » | |||
No description.
Returns: boolean
Whether the buffer is empty.
|
code » | |||
Helper function to convert an index in the number space of oldest to
newest items in the array to the position that the element will be at in the
underlying array.
|
code » | |||
![]()
Sets the item at the specified index.
Arguments:
|
code » |