Interface IQueue<T>
Implements First-In-First-Out queue data structure.
Inherited Members
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public interface IQueue<T> : IDataStructure<T>, ISteppable<T>, System.Collections.Generic.IEnumerable<T>, DataStructure.ICountable, DataStructure.IClearable
Type Parameters
| Name | Description |
|---|---|
| T | The generic type within the structure. |
Properties
| Improve this Doc View SourceNewest
The current newest element in the queue.
Declaration
T Newest { get; }
Property Value
| Type | Description |
|---|---|
| T |
Oldest
The current oldest element in the queue.
Declaration
T Oldest { get; }
Property Value
| Type | Description |
|---|---|
| T |
Methods
| Improve this Doc View SourceDequeue()
Removes the oldest item in the queue.
Declaration
T Dequeue()
Returns
| Type | Description |
|---|---|
| T | The next item in the queue. |
Enqueue(T)
Adds an item to the back of the queue.
Declaration
void Enqueue(T enqueue)
Parameters
| Type | Name | Description |
|---|---|---|
| T | enqueue | The item to add to the queue. |
Peek()
Gets the next item in the queue without removing it.
Declaration
T Peek()
Returns
| Type | Description |
|---|---|
| T | The next item in the queue. |