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
- Extension Methods
Constructors
SortableQueue()
public SortableQueue()
Fields
Count
public int Count
Field Value
array
protected T[] array
Field Value
- T[]
head
protected int head
Field Value
maxSize
public int maxSize
Field Value
tail
protected int tail
Field Value
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()