mirror of
https://github.com/AlexMacocian/SystemExtensions.git
synced 2026-07-24 03:56:27 +00:00
Port to netstandard.
Nit fixes. Fixed e2e tests. Added MIT license.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for queue implementations.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Provided type.</typeparam>
|
||||
public interface IQueue<T> : IEnumerable<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the number of items in the queue.
|
||||
/// </summary>
|
||||
int Count { get; }
|
||||
/// <summary>
|
||||
/// Inserts item into the queue.
|
||||
/// </summary>
|
||||
/// <param name="item">Item to be inserted.</param>
|
||||
void Enqueue(T item);
|
||||
/// <summary>
|
||||
/// Remove the first item in the queue.
|
||||
/// </summary>
|
||||
/// <returns>First item in the queue.</returns>
|
||||
T Dequeue();
|
||||
/// <summary>
|
||||
/// Looks up the first item from the queue without removing it.
|
||||
/// </summary>
|
||||
/// <returns>First item from the queue.</returns>
|
||||
T Peek();
|
||||
/// <summary>
|
||||
/// Clears the contents of the queue.
|
||||
/// </summary>
|
||||
void Clear();
|
||||
/// <summary>
|
||||
/// Checks if queue contains an item.
|
||||
/// </summary>
|
||||
/// <param name="item">Item to be checked.</param>
|
||||
/// <returns>True if queue contains provided item. False otherwise.</returns>
|
||||
bool Contains(T item);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user