class CircularBuffer<T>
in global :: Sandbox . Utility
Circular buffer, push pop and index access is always O(1).
public CircularBuffer<T>( int capacity )
Initializes a new instance of the class.
capacityBuffer capacity. Must be positive.
public int Capacity { get; }
Maximum capacity of the buffer. Elements pushed into the buffer after maximum capacity is reached (IsFull = true), will remove an element.
public bool IsFull { get; }
Boolean indicating if Circular is at full capacity. Adding more elements when the buffer is full will cause elements to be removed from the other end of the buffer.
public bool IsEmpty { get; }
True if has no elements.
public int Size { get; }
Current buffer size (the number of elements that the buffer has).
public int GetHashCode( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public IEnumerator<T> GetEnumerator( )
😔 No documentation found.
public IEnumerable<ArraySegment<T>> ToArraySegments( )
😔 No documentation found.
public T[] ToArray( )
😔 No documentation found.
public CircularBuffer<T>( int capacity, T[] items )
😔 No documentation found.
public void PopBack( )
😔 No documentation found.
public void PushFront( T item )
😔 No documentation found.
public void PushBack( T item )
😔 No documentation found.
public T Item { get; set; }
😔 No documentation found.
public T Back( )
😔 No documentation found.
public T Front( )
😔 No documentation found.
public void Clear( )
😔 No documentation found.
public void PopFront( )
😔 No documentation found.