Home > rc-js-util > CircularBuffer
Presents an array as if it were circular, going past the end or start loops around.
Signature:
export declare class CircularBuffer<TValue>
Supports negative indexes.
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(values) | Constructs a new instance of the CircularBuffer class |
| Property | Modifiers | Type | Description |
|---|---|---|---|
| size | number |
| Method | Modifiers | Description |
|---|---|---|
| clone() | ||
| createEmpty(size) | static |
|
| createOne(initialValues) | static |
|
| getSetValue(index, value) | returns the value stored at the index and sets the provided value | |
| getValue(index) | ||
| setValue(index, value) |