Table of Contents

Class SortableQueue<T>

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll
public class SortableQueue<T> where T : IComparable<T>

Type Parameters

T
Inheritance
SortableQueue<T>
Inherited Members

Constructors

SortableQueue()

public SortableQueue()

Fields

Count

public int Count

Field Value

int

array

protected T[] array

Field Value

T[]

head

protected int head

Field Value

int

maxSize

public int maxSize

Field Value

int

tail

protected int tail

Field Value

int

Methods

Clear()

public void Clear()

Dequeue()

Will return invalid data if called when Count <= 0: it is the responsibility of the calling code to check Count > 0

public T Dequeue()

Returns

T

DequeueLIFO()

Will return invalid data if called when Count <= 0: it is the responsibility of the calling code to check Count > 0

public T DequeueLIFO()

Returns

T

Enqueue(T)

public void Enqueue(T v)

Parameters

v T

EnqueueOrMerge(T)

public void EnqueueOrMerge(T v)

Parameters

v T

RunForEach(Action<T>)

public void RunForEach(Action<T> action)

Parameters

action Action<T>

Sort()

public void Sort()