RingBuffer
(
capacity
)
|
Allocates and initialises the buffer.
Signature
RingBuffer(int capacity) Parameters capacity: int
The length of the buffer
|
Capacity
: int
[Get] |
Signature
int Capacity |
Count
: int
[Get] |
Signature
int Count |
this[int index]
: T
[Get] |
summary> Gets the element at a specified offset from the current head of the buffer.
It's useful for looking ahead or behind the buffer without altering its state. /summary>
Signature
T this[int index] |
Add
(
item
)
|
Inserts a value in the next entry of the buffer.
It overwrites the value already present there.
Signature
void Add(T item) Parameters item: T
The value to set
Returns void
The element at the specified index in the buffer.
|
Clear
()
|
Initialises the buffer.
Signature
void Clear() Returns void |
Peek
(
offset
)
|
Signature
T Peek(int offset=0) Parameters offset: intReturns T |