PriorityQueue Constructor
Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

PriorityQueue Constructor

Creates a PriorityQueue containing the elements in the specified collection. The priority queue has an initial capacity of 110% of the size of the specified collection or 1 if the collection is empty. If the specified collection is an instance of a PriorityQueue, the priority queue will be sorted according to the same comparator, or according to its elements' natural order if the collection is sorted according to its elements' natural order. Otherwise, the priority queue is ordered according to its elements' natural order.

[Visual Basic]
Public Overloads Sub New( _
   ByVal collection As ICollection _
   ICollection collection


the collection whose elements are to be placed into this priority queue.


Exception Type Condition
InvalidCastException if elements of collection cannot be compared to one another according to the priority queue's ordering
ArgumentNullException if collection or any element with it is

See Also

PriorityQueue Class | Spring.Collections Namespace | PriorityQueue Constructor Overload List