Proton DotNet
|
A linear collection type that supports element insertion and removal at both ends. This double ended queue type will most commonly be implemented with no underlying fixed capacity limit however the interface allows for restricted capacity versions to be implemented all the same. More...
Public Member Functions | |
void | Enqueue (T value) |
Inserts the given value onto the back of this queue unless the queue has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueue method and check the return value to determine if the operation succeeded. | |
bool | TryEnqueue (T value) |
Attempts to insert the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception. | |
void | EnqueueFront (T value) |
Inserts the given value onto the front of this queue unless the queue has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueueFront method and check the return value to determine if the operation succeeded. | |
bool | TryEnqueueFront (T value) |
Attempts to insert the given value onto the front of this queue unless the queue has reached its capacity limit in which case this method would throw an exception. | |
void | EnqueueBack (T value) |
Inserts the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueueBack method and check the return value to determine if the operation succeeded. | |
bool | TryEnqueueBack (T value) |
Attempts to insert the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception. | |
T | Dequeue () |
Removes and returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryDequeue method and check the return value to see if the operation succeeded. | |
bool | TryDequeue (out T front) |
Attempt to remove and return the element at the front of the queue if there is any element to return otherwise the method returns false. | |
T | Peek () |
Returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryPeek method and check the return value to see if the operation succeeded. | |
bool | TryPeek (out T front) |
Attempt to read and return the element at the front of the queue if there is any element to return otherwise the method returns false. | |
T | PeekFront () |
Returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryPeek method and check the return value to see if the operation succeeded. | |
bool | TryPeekFront (out T front) |
Attempt to read and return the element at the front of the queue if there is any element to return otherwise the method returns false. | |
T | PeekBack () |
Returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryPeek method and check the return value to see if the operation succeeded. | |
bool | TryPeekBack (out T front) |
Attempt to read and return the element at the front of the queue if there is any element to return otherwise the method returns false. | |
T | DequeueFront () |
Removes and returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryDequeueFront method and check the return value to see if the operation succeeded. | |
bool | TryDequeueFront (out T front) |
Attempt to remove and return the element at the front of the queue if there is any element to return otherwise the method returns false. | |
T | DequeueBack () |
Removes and returns the element at the back of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryDequeue method and check the return value to see if the operation succeeded. | |
bool | TryDequeueBack (out T back) |
Attempt to remove and return the element at the back of the queue if there is any element to return otherwise the method returns false. | |
void ICollection< T >. | Add (T item) |
Inserts the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueueBack method and check the return value to determine if the operation succeeded. | |
Properties | |
bool | IsEmpty [get] |
Returns true if the double ended queue is currently empty. This method provides an optimized means of checking for empty in this collection type where otherwise the count property might be used which could require a calculation on each call to determine the current element count. | |
new int | Count [get] |
Returns the current number of elements contained in the double ended Queue. | |
A linear collection type that supports element insertion and removal at both ends. This double ended queue type will most commonly be implemented with no underlying fixed capacity limit however the interface allows for restricted capacity versions to be implemented all the same.
This interface defines methods to access the elements at both ends of the deque. Methods are provided to insert, remove, and or peek at elements. Each of these methods exists in two forms: one throws an exception if the operation fails, the other returns a boolean value to indicate if the operation succeeded or failed. The try based form of the insert operation is designed specifically for use with capacity-restricted queue implementations; in most implementations, insert operations cannot fail.
T | The type that is carried in this collection |
|
inline |
Inserts the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueueBack method and check the return value to determine if the operation succeeded.
value | The value to add to the back of the queue |
InvalidOperationException | If the queue is currently at max capacity |
T Apache.Qpid.Proton.Utilities.IDeque< T >.Dequeue | ( | ) |
Removes and returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryDequeue method and check the return value to see if the operation succeeded.
InvalidOperationException | If the queue is currently empty |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
T Apache.Qpid.Proton.Utilities.IDeque< T >.DequeueBack | ( | ) |
Removes and returns the element at the back of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryDequeue method and check the return value to see if the operation succeeded.
InvalidOperationException | If the queue is currently empty |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
T Apache.Qpid.Proton.Utilities.IDeque< T >.DequeueFront | ( | ) |
Removes and returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryDequeueFront method and check the return value to see if the operation succeeded.
InvalidOperationException | If the queue is currently empty |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
void Apache.Qpid.Proton.Utilities.IDeque< T >.Enqueue | ( | T | value | ) |
Inserts the given value onto the back of this queue unless the queue has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueue method and check the return value to determine if the operation succeeded.
value | The value to add to the tail of the queue |
InvalidOperationException | If the queue is currently at max capacity |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
void Apache.Qpid.Proton.Utilities.IDeque< T >.EnqueueBack | ( | T | value | ) |
Inserts the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueueBack method and check the return value to determine if the operation succeeded.
value | The value to add to the back of the queue |
InvalidOperationException | If the queue is currently at max capacity |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
void Apache.Qpid.Proton.Utilities.IDeque< T >.EnqueueFront | ( | T | value | ) |
Inserts the given value onto the front of this queue unless the queue has reached its capacity limit in which case this method would throw an exception. Generally it is preferable to call the TryEnqueueFront method and check the return value to determine if the operation succeeded.
value | The value to add to the front of the queue |
InvalidOperationException | If the queue is currently at max capacity |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
T Apache.Qpid.Proton.Utilities.IDeque< T >.Peek | ( | ) |
Returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryPeek method and check the return value to see if the operation succeeded.
InvalidOperationException | If the queue is currently empty |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
T Apache.Qpid.Proton.Utilities.IDeque< T >.PeekBack | ( | ) |
Returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryPeek method and check the return value to see if the operation succeeded.
InvalidOperationException | If the queue is currently empty |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
T Apache.Qpid.Proton.Utilities.IDeque< T >.PeekFront | ( | ) |
Returns the element at the front of the queue if the queue is currently not empty, otherwise this method throws an exception to indicate that there is no value in the queue currently. Generally it is preferable to call the TryPeek method and check the return value to see if the operation succeeded.
InvalidOperationException | If the queue is currently empty |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryDequeue | ( | out T | front | ) |
Attempt to remove and return the element at the front of the queue if there is any element to return otherwise the method returns false.
front | A reference to store the value at the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryDequeueBack | ( | out T | back | ) |
Attempt to remove and return the element at the back of the queue if there is any element to return otherwise the method returns false.
back | A reference to store the value at the back of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryDequeueFront | ( | out T | front | ) |
Attempt to remove and return the element at the front of the queue if there is any element to return otherwise the method returns false.
front | A reference to store the value at the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryEnqueue | ( | T | value | ) |
Attempts to insert the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception.
value | The value to add to the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryEnqueueBack | ( | T | value | ) |
Attempts to insert the given value onto the back of this queue unless the deque has reached its capacity limit in which case this method would throw an exception.
value | The value to add to the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryEnqueueFront | ( | T | value | ) |
Attempts to insert the given value onto the front of this queue unless the queue has reached its capacity limit in which case this method would throw an exception.
value | The value to add to the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryPeek | ( | out T | front | ) |
Attempt to read and return the element at the front of the queue if there is any element to return otherwise the method returns false.
front | A reference to store the value at the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryPeekBack | ( | out T | front | ) |
Attempt to read and return the element at the front of the queue if there is any element to return otherwise the method returns false.
front | A reference to store the value at the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
bool Apache.Qpid.Proton.Utilities.IDeque< T >.TryPeekFront | ( | out T | front | ) |
Attempt to read and return the element at the front of the queue if there is any element to return otherwise the method returns false.
front | A reference to store the value at the front of the queue |
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
|
get |
Returns the current number of elements contained in the double ended Queue.
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.
|
get |
Returns true if the double ended queue is currently empty. This method provides an optimized means of checking for empty in this collection type where otherwise the count property might be used which could require a calculation on each call to determine the current element count.
Implemented in Apache.Qpid.Proton.Utilities.ArrayDeque< T >.