Table of Contents

Interface IQueue<T>

Namespace
AlgorithmsSW.Queue
Assembly
AlgorithmsSW.dll

Represents a generic queue of items.

[PageReference(121)]
public interface IQueue<T> : IEnumerable<T>, IEnumerable

Type Parameters

T

The type of items contained in the queue.

Inherited Members
Extension Methods

Properties

Count

Gets the number of items contained in the IQueue<T>.

int Count { get; }

Property Value

int

IsEmpty

Gets a value indicating whether the IQueue<T> is empty.

bool IsEmpty { get; }

Property Value

bool

IsSingleton

Gets a value indicating whether the IQueue<T> contains only one item.

bool IsSingleton { get; }

Property Value

bool

Peek

Gets the item at the beginning of the IQueue<T> without removing it.

T Peek { get; }

Property Value

T

Methods

Clear()

Removes all items from the IQueue<T>.

void Clear()

Dequeue()

Removes and returns the item at the beginning of the IQueue<T>.

T Dequeue()

Returns

T

The item at the beginning of the IQueue<T>.

Enqueue(T)

Adds an item to the end of the IQueue<T>.

void Enqueue(T item)

Parameters

item T

The item to add to the IQueue<T>.