Table of Contents

Class RingBuffer<T>

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Represents buffer with a fixed capacity.

[Version(4, 1, 0)]
public sealed class RingBuffer<T> : IResizeableBuffer<T>, IBuffer<T>, IReadOnlyBuffer<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements this buffer can hold.

Inheritance
RingBuffer<T>
Implements
Inherited Members
Extension Methods

Remarks

Constructors

RingBuffer(int)

Initializes a new instance of the RingBuffer<T> class.

Properties

Capacity

Gets the maximum number of elements the buffer can hold.

Count

Gets the current number of elements in the buffer.

First

Gets the first element in the buffer.

IsFull

Gets a value indicating whether the buffer is full.

this[int]

Gets the element at the specified index.

Last

Gets the last element in the buffer.

Methods

Clear()

Clears all items from the buffer.

DecreaseCapacity(int)

Decreases the capacity of this IResizeableBuffer<T> by the specified decrement (up to the current capacity).

GetEnumerator()
IncreaseCapacity(int)

Increases the capacity of this IResizeableBuffer<T> by the specified increment.

Insert(T)

Inserts an item into the buffer.