Class PriorityQueue<T>
- Namespace
 - Stride.Core.Collections
 
- Assembly
 - Stride.Core.dll
 
Represents a sorted queue, with logarithmic time insertion and deletion.
public class PriorityQueue<T>
  Type Parameters
TThe type of the elements in the queue.
- Inheritance
 - 
      objectPriorityQueue<T>
 
Constructors
PriorityQueue()
public PriorityQueue()
  PriorityQueue(IComparer<T>)
public PriorityQueue(IComparer<T> comparer)
  Parameters
comparerIComparer<T>
Properties
Count
public int Count { get; }
  Property Value
Empty
public bool Empty { get; }
  Property Value
Methods
Clear()
public void Clear()
  Dequeue()
Removes and returns the object at the beginning of the PriorityQueue<T>.
public T Dequeue()
  Returns
- T
 The object at the beginning of the PriorityQueue<T>.
Enqueue(T)
Adds an object to the PriorityQueue<T> and sorts underlying container.
public void Enqueue(T item)
  Parameters
itemTThe object to add to the queue.
Peek()
Returns the object at the beginning of the PriorityQueue<T>, without removing it.
public T Peek()
  Returns
- T
 The object at the beginning of the PriorityQueue<T>.
Remove(T)
public void Remove(T item)
  Parameters
itemT