Table of Contents

Class RingArray<T>

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll
public class RingArray<T> : IEnumerable<T>, IEnumerable

Type Parameters

T
Inheritance
RingArray<T>
Implements
Inherited Members
Extension Methods

Constructors

RingArray(int)

public RingArray(int capacity)

Parameters

capacity int

RingArray(int, T[])

public RingArray(int capacity, T[] initialvalues)

Parameters

capacity int
initialvalues T[]

Properties

EndPosition

public int EndPosition { get; set; }

Property Value

int

this[int]

public T this[int index] { get; set; }

Parameters

index int

Property Value

T

Length

Total size of the stack

public int Length { get; }

Property Value

int

Values

public T[] Values { get; }

Property Value

T[]

Methods

Add(T)

Pushes an element onto the end of the queue

public void Add(T elem)

Parameters

elem T

Clear()

Wipes the buffer and resets the count

public void Clear()

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

An enumerator that can be used to iterate through the collection.

ResizeTo(int)

If smaller than the old size, will discard oldest elements first

public void ResizeTo(int size)

Parameters

size int