Table of Contents

Class RandomAccessQueue<T>

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Represents a queue that allows random access to its elements.

[Version(4, 2, 0)]
public class RandomAccessQueue<T> : IReadOnlyCollection<T>, IEnumerable<T>, ICollection, IEnumerable

Type Parameters

T

The type of elements in the queue.

Inheritance
RandomAccessQueue<T>
Implements
Inherited Members
Extension Methods

Remarks

This RandomAccessQueue<T> follows the design of Queue<T> very closely, and can be used as a drop-in replacement for it.

Constructors

RandomAccessQueue(IEnumerable<T>)

Initializes a new instance of the RandomAccessQueue<T> class that contains elements copied from the specified collection.

RandomAccessQueue(int)

Initializes a new instance of the RandomAccessQueue<T> class that is empty and has the specified capacity.

Properties

Count
IsEmpty

Gets a value indicating whether the queue is empty.

IsFull

Gets a value indicating whether the queue is full, that is, Count is equal to the capapcity.

IsSynchronized
this[int]

Returns the element at the specified index, where the head of the queue is at index 0.

SyncRoot

Methods

Clear()
Contains(T)
CopyTo(Array, int)
Dequeue()
Enqueue(T)
EnsureCapacity(int)
GetEnumerator()
Peek()
ToArray()
TrimExcess()
TryDequeue(out T)
TryPeek(out T)