Persistate API documentation
CircularBuffer<(Of <(<'T>)>)> Class
NamespacesPersistate.UtilCircularBuffer<(Of <(<'T>)>)>

[This is preliminary documentation and is subject to change.]

Implements a circular buffer of a fixed capacity.
Declaration Syntax
C#
public class CircularBuffer<T> : IEnumerable<T>, 
	IEnumerable
Generic Template Parameters
T
The type of objects in the buffer.
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
CircularBuffer<(Of <(<'T>)>)>(Int32)
Creates a new CircularBuffer of a particular capacity.

Add(T)
Add an item to the tail of the CircularBuffer.

Count
Gets the number of items currently in the buffer.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetEnumerator()()()()
Gets an enumerator for the items in the CircularBuffer.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Item[([( Int32])])
Gets a particular item in the buffer.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Remove()()()()
Removes an item from the head of the CircularBuffer.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Remarks

The buffer fills up by adding items to the tail using the Add(T) method. You can also explicitly remove items from the head using the Remove()()()() method. When the buffer is full, old items are removed and discarded from the head as new ones are added to the tail. The integer indexer gets items indexed from the head, and the enumerator yields items in order from the head to the tail. All operations apart from enumerations are O(1).

This class is not thread safe.

Inheritance Hierarchy
Object
CircularBuffer<(Of <(<'T>)>)>

Assembly: Persistate.Util (Module: Persistate.Util) Version: 0.6.1.20 (0.6.1.20)