Joutsen v0.5.0+12-g5dd5f7e
Public Member Functions | Properties | List of all members
Joutsen.Collections.Generic.Queue< ItemType > Interface Template Reference

An interface describing first-in first-out data structures. More...

Public Member Functions

void Enqueue (ItemType item)
 Adds an item to the front of the queue. More...
 
void Enqueue (SCG.IEnumerable< ItemType > items)
 Adds a number of items to the front of the queue. More...
 
ItemType Dequeue ()
 Fetches and removes the last item in the queue. More...
 
ItemType Peek ()
 Fetches the last value in the queue without removing it. More...
 
void Clear ()
 Removes all the items from the Queue. More...
 

Properties

int Count [get]
 The number of elements in the queue. More...
 

Detailed Description

An interface describing first-in first-out data structures.

Since
0.4.0

Member Function Documentation

◆ Clear()

void Joutsen.Collections.Generic.Queue< ItemType >.Clear ( )

Removes all the items from the Queue.

Implemented in Joutsen.Collections.Generic.RingBuffer< ItemType >.

◆ Dequeue()

ItemType Joutsen.Collections.Generic.Queue< ItemType >.Dequeue ( )

Fetches and removes the last item in the queue.

Returns
the last item in the queue

◆ Enqueue() [1/2]

void Joutsen.Collections.Generic.Queue< ItemType >.Enqueue ( ItemType  item)

Adds an item to the front of the queue.

Parameters
itemthe item to add to the queue

◆ Enqueue() [2/2]

void Joutsen.Collections.Generic.Queue< ItemType >.Enqueue ( SCG.IEnumerable< ItemType >  items)

Adds a number of items to the front of the queue.

Parameters
itemsthe items to add to the queue

◆ Peek()

ItemType Joutsen.Collections.Generic.Queue< ItemType >.Peek ( )

Fetches the last value in the queue without removing it.

Returns
the last item in the queue

Property Documentation

◆ Count

int Joutsen.Collections.Generic.Queue< ItemType >.Count
get

The number of elements in the queue.

Implemented in Joutsen.Collections.Generic.RingBuffer< ItemType >.