-
-
Save eiriktsarpalis/45d42f31f765a75bfd45f9487f9ed4e6 to your computer and use it in GitHub Desktop.
PriorityQueue api surface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Collections.Generic | |
{ | |
class PriorityQueue<TElement, TPriority> : IReadOnlyCollection<(TElement Element, TPriority Priority)> | |
{ | |
#region Constructors | |
public PriorityQueue() { } | |
public PriorityQueue(IComparer<TPriority> comparer) { } | |
public PriorityQueue(IEnumerable<(TElement Element, TPriority Priority)> values) { } | |
public PriorityQueue(IEnumerable<(TElement Element, TPriority Priority)> values, IComparer<TPriority> comparer) { } | |
#endregion | |
#region Specific APIs | |
public IComparer<TPriority> Comparer { get { throw null; } } | |
public TElement Dequeue() { throw null; } | |
public void Enqueue(TElement item, TPriority priority) { } | |
public TElement Peek() { throw null; } | |
public bool TryDequeue(out TElement item) { throw null; } | |
public bool TryPeek(out TElement item) { throw null; } | |
#endregion | |
#region IReadOnlyCollection | |
public int Count { get { throw null; } } | |
public IEnumerator GetEnumerator() { throw null; } | |
#endregion | |
#region Enumerator | |
public struct Enumerator : IEnumerator<(TElement Element, TPriority Priority)>, IEnumerator, IDisposable | |
{ | |
public (TElement Element, TPriority Priority) Current { get { throw null; } } | |
object System.Collections.IEnumerator.Current { get { throw null; } } | |
public void Dispose() { } | |
public bool MoveNext() { throw null; } | |
void System.Collections.IEnumerator.Reset() { } | |
} | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment