Share via


PriorityQueue Constructors

Definition

Overloads

PriorityQueue()

Creates a PriorityQueue with the default initial capacity (11) that orders its elements according to their Comparable natural ordering.

PriorityQueue(IComparator)

Creates a PriorityQueue with the default initial capacity and whose elements are ordered according to the specified comparator.

PriorityQueue(ISortedSet)

Creates a PriorityQueue containing the elements in the specified sorted set.

PriorityQueue(PriorityQueue)

Creates a PriorityQueue containing the elements in the specified priority queue.

PriorityQueue(ICollection)

Creates a PriorityQueue containing the elements in the specified collection.

PriorityQueue(Int32)

Creates a PriorityQueue with the specified initial capacity that orders its elements according to their Comparable natural ordering.

PriorityQueue(Int32, IComparator)

Creates a PriorityQueue with the specified initial capacity that orders its elements according to the specified comparator.

PriorityQueue(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

PriorityQueue()

Creates a PriorityQueue with the default initial capacity (11) that orders its elements according to their Comparable natural ordering.

[Android.Runtime.Register(".ctor", "()V", "")]
public PriorityQueue ();
Attributes

Remarks

Creates a PriorityQueue with the default initial capacity (11) that orders its elements according to their Comparable natural ordering.

Java documentation for java.util.PriorityQueue.PriorityQueue().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(IComparator)

Creates a PriorityQueue with the default initial capacity and whose elements are ordered according to the specified comparator.

[Android.Runtime.Register(".ctor", "(Ljava/util/Comparator;)V", "", ApiSince=24)]
public PriorityQueue (Java.Util.IComparator? comparator);
[<Android.Runtime.Register(".ctor", "(Ljava/util/Comparator;)V", "", ApiSince=24)>]
new Java.Util.PriorityQueue : Java.Util.IComparator -> Java.Util.PriorityQueue

Parameters

comparator
IComparator

the comparator that will be used to order this priority queue. If null, the Comparable natural ordering of the elements will be used.

Attributes

Remarks

Creates a PriorityQueue with the default initial capacity and whose elements are ordered according to the specified comparator.

Added in 1.8.

Java documentation for java.util.PriorityQueue.PriorityQueue(java.util.Comparator<? super E>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(ISortedSet)

Creates a PriorityQueue containing the elements in the specified sorted set.

[Android.Runtime.Register(".ctor", "(Ljava/util/SortedSet;)V", "")]
public PriorityQueue (Java.Util.ISortedSet? c);
[<Android.Runtime.Register(".ctor", "(Ljava/util/SortedSet;)V", "")>]
new Java.Util.PriorityQueue : Java.Util.ISortedSet -> Java.Util.PriorityQueue

Parameters

c
ISortedSet

the sorted set whose elements are to be placed into this priority queue

Attributes

Remarks

Creates a PriorityQueue containing the elements in the specified sorted set. This priority queue will be ordered according to the same ordering as the given sorted set.

Java documentation for java.util.PriorityQueue.PriorityQueue(java.util.SortedSet<? extends E>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(PriorityQueue)

Creates a PriorityQueue containing the elements in the specified priority queue.

[Android.Runtime.Register(".ctor", "(Ljava/util/PriorityQueue;)V", "")]
public PriorityQueue (Java.Util.PriorityQueue? c);
[<Android.Runtime.Register(".ctor", "(Ljava/util/PriorityQueue;)V", "")>]
new Java.Util.PriorityQueue : Java.Util.PriorityQueue -> Java.Util.PriorityQueue

Parameters

c
PriorityQueue

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

Attributes

Remarks

Creates a PriorityQueue containing the elements in the specified priority queue. This priority queue will be ordered according to the same ordering as the given priority queue.

Java documentation for java.util.PriorityQueue.PriorityQueue(java.util.PriorityQueue<? extends E>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(ICollection)

Creates a PriorityQueue containing the elements in the specified collection.

[Android.Runtime.Register(".ctor", "(Ljava/util/Collection;)V", "")]
public PriorityQueue (System.Collections.ICollection? c);
[<Android.Runtime.Register(".ctor", "(Ljava/util/Collection;)V", "")>]
new Java.Util.PriorityQueue : System.Collections.ICollection -> Java.Util.PriorityQueue

Parameters

c
ICollection

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

Attributes

Remarks

Creates a PriorityQueue containing the elements in the specified collection. If the specified collection is an instance of a SortedSet or is another PriorityQueue, this priority queue will be ordered according to the same ordering. Otherwise, this priority queue will be ordered according to the Comparable natural ordering of its elements.

Java documentation for java.util.PriorityQueue.PriorityQueue(java.util.Collection<? extends E>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(Int32)

Creates a PriorityQueue with the specified initial capacity that orders its elements according to their Comparable natural ordering.

[Android.Runtime.Register(".ctor", "(I)V", "")]
public PriorityQueue (int initialCapacity);
[<Android.Runtime.Register(".ctor", "(I)V", "")>]
new Java.Util.PriorityQueue : int -> Java.Util.PriorityQueue

Parameters

initialCapacity
Int32

the initial capacity for this priority queue

Attributes

Exceptions

if the initialCapacity is less than 1.

Remarks

Creates a PriorityQueue with the specified initial capacity that orders its elements according to their Comparable natural ordering.

Java documentation for java.util.PriorityQueue.PriorityQueue(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(Int32, IComparator)

Creates a PriorityQueue with the specified initial capacity that orders its elements according to the specified comparator.

[Android.Runtime.Register(".ctor", "(ILjava/util/Comparator;)V", "")]
public PriorityQueue (int initialCapacity, Java.Util.IComparator? comparator);
[<Android.Runtime.Register(".ctor", "(ILjava/util/Comparator;)V", "")>]
new Java.Util.PriorityQueue : int * Java.Util.IComparator -> Java.Util.PriorityQueue

Parameters

initialCapacity
Int32

the initial capacity for this priority queue

comparator
IComparator

the comparator that will be used to order this priority queue. If null, the Comparable natural ordering of the elements will be used.

Attributes

Remarks

Creates a PriorityQueue with the specified initial capacity that orders its elements according to the specified comparator.

Java documentation for java.util.PriorityQueue.PriorityQueue(int, java.util.Comparator<? super E>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

PriorityQueue(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected PriorityQueue (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Util.PriorityQueue : nativeint * Android.Runtime.JniHandleOwnership -> Java.Util.PriorityQueue

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to