Class Capacity2Buffer<T>
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
Represents a buffer with a fixed capacity of two items.
[Version(4, 1, 0)]
public sealed class Capacity2Buffer<T> : IBuffer<T>, IReadOnlyBuffer<T>, IEnumerable<T>, IEnumerable
Type Parameters
T
The type of items contained in the buffer.
- Inheritance
-
Capacity2Buffer<T>
- Implements
-
IBuffer<T>IEnumerable<T>
- Inherited Members
- Extension Methods
Remarks
This class has been optimized for the special case of buffer a value and its previous value.
Properties
- Capacity
Gets the maximum number of elements the buffer can hold.
- Count
Gets the current number of elements in the buffer.
- First
Represents a generic buffer interface.
- HasPreviousValue
Gets a value indicating whether this buffer has a previous value.
- HasValue
Gets a value indicating whether this buffer has a value.
- IsFull
Gets a value indicating whether the buffer is full.
- this[int]
Gets the element at the specified index.
- Last
Represents a generic buffer interface.
Methods
- Clear()
Clears all items from the buffer.
- Insert(T)
Inserts an item into the buffer.