Struct CircularBuffer Extends IReadOnlyList<T>, IReadOnlyCollection<T>
Public
Implements an efficient circular buffer that can be appended to in both directions.
Public Methods
Splice
(startIndex, toRemove, toInsert)
Removes toRemove items from the buffer, starting at startIndex, and then inserts the toInsert items at startIndex.
SpliceUninitialized
(startIndex, toRemove, toInsert)
Like Splice, but the newly inserted items are left in an uninitialized state.
SpliceUninitializedAbsolute
(startIndex, toRemove, toInsert)
Like SpliceUninitialized, but startIndex is an absolute index.
Public Variables
AbsoluteEndIndex
Absolute index of the last item in the buffer, may be negative or greater than Length.
Public
Readonly
AbsoluteStartIndex
Absolute index of the first item in the buffer, may be negative or greater than Length.
Public
Readonly
Count
Public
Readonly
First
First item in the buffer, throws if the buffer is empty.
Public
Readonly
Last
Last item in the buffer, throws if the buffer is empty.
Public
Readonly
Length
Number of items in the buffer.
Public
Readonly
length
Public
this[int index]
Indexes the buffer, with index 0 being the first element.
Public
Private/Protected Members
data
Internal
head
Internal