Share via


CircularBuffer<T> Class

Definition

Circular buffer. Given a fixed size, fills to capacity and then overwrites earliest item.

public class CircularBuffer<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>
type CircularBuffer<'T> = class
    interface IList<'T>
    interface ICollection<'T>
    interface seq<'T>
    interface IEnumerable
Public Class CircularBuffer(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList(Of T)

Type Parameters

T
Inheritance
CircularBuffer<T>
Implements

Constructors

CircularBuffer<T>(Int32, T[])
CircularBuffer<T>(Int32)

Properties

Capacity
Count
IsEmpty
IsFixedSize
IsFull
IsReadOnly
IsSynchronized
Item[Int32]
SyncRoot

Methods

Add(T)
Clear()
Contains(T)
CopyTo(T[], Int32)
GetEnumerator()
IndexOf(T)
Insert(Int32, T)
Remove(T)
RemoveAt(Int32)
ToArray()

Copies the buffer contents to an array

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Extension Methods

EmptyIfNull<T>(IEnumerable<T>)

Return this enumeration in case it is not null. In case it is null return empty enumeration.

Applies to