Last active
September 22, 2020 17:19
-
-
Save safern/5814bf25dacf82596ad4faa3cf53a4e4 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<T> : ICollection<T> | |
{ | |
#region Constructors | |
public PriorityQueue() { } | |
public PriorityQueue(IComparer<T> comparer) { } | |
public PriorityQueue(IEnumerable<T> items) { } | |
public PriorityQueue(IEnumerable<T> items, IComparer<T> comparer) { } | |
#endregion | |
#region ICollection | |
public void Clear() { } | |
public bool Contains(T item) { throw null; } | |
public int Count { get { throw null; } } | |
public void CopyTo(T[] array, int arrayIndex) { } | |
public Enumerator GetEnumerator() { throw null; } | |
void ICollection<T>.Add(T item) { } | |
bool ICollection<T>.IsReadOnly { get { throw null; } } | |
IEnumerator IEnumerable.GetEnumerator() { throw null; } | |
public bool Remove(T item) { throw null; } | |
#endregion | |
#region Specific APIs | |
public IComparer<T> Comparer { get { throw null; } } | |
public T Dequeue() { throw null; } | |
public void Enqueue(T item) { } | |
public T Peek() { throw null; } | |
public bool TryDequeue(out T item) { throw null; } | |
public bool TryPeek(out T item) { throw null; } | |
#endregion | |
#region Enumerator | |
public struct Enumerator : IEnumerator<T>, IEnumerator, IDisposable | |
{ | |
public T 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