A collection designed for holding elements prior to processing.
For a list of all members of this type, see IQueue Members .
|AbstractQueue||This class provides skeletal implementations of some IQueue operations.|
|PriorityQueue|| An unbounded priority IQueue based on a priority heap. This queue orders elements according to an order specified at construction time, which is specified either according to their natural order (see IComparable, or according to a IComparer, depending on which constructor is used. A priority queue does not permit
Besides basic ICollection operations, queues provide additional insertion, extraction, and inspection operations.
Each of these methods exists in two forms: one throws an exception if the operation fails, the other returns a special value (either
Queues typically, but do not necessarily, order elements in a FIFO (first-in-first-out) manner. Among the exceptions are priority queues, which order elements according to a supplied comparator, or the elements' natural ordering, and LIFO queues (or stacks) which order the elements LIFO (last-in-first-out). Whatever the ordering used, the head of the queue is that element which would be removed by a call to Remove or Poll. In a FIFO queue, all new elements are inserted at the tail of the queue. Other kinds of queues may use different placement rules. Every IQueue implementation must specify its ordering properties.
The Offer method inserts an element if possible, otherwise returning
The RemovePoll methods remove and return the head of the queue. Exactly which element is removed from the queue is a function of the queue's ordering policy, which differs from implementation to implementation. The Remove and Poll methods differ only in their behavior when the queue is empty: the Remove method throws an exception, while the Poll method returns
The IQueue interface does not define the blocking queue methods, which are common in concurrent programming.
IQueue implementations generally do not allow insertion of
IQueue implementations generally do not define element-based versions of methods Equals and GetHashCode, but instead inherit the identity based versions from the class object, because element-based equality is not always well-defined for queues with the same elements but different ordering properties.
Based on the back port of JCP JSR-166.
Assembly: Spring.Core (in Spring.Core.dll)