T - Specifies the type of elements in the queue.public class PriorityQueue64<T>
extends java.lang.Object
| Constructor and Description |
|---|
PriorityQueue64(java.lang.Class<T> type)
Constructs an empty priority queue with the default
comparator.
|
PriorityQueue64(java.lang.Class<T> type,
IFunc2Arg<T,T,java.lang.Boolean> compare)
Constructs an empty priority queue with the specified
comparator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Clear()
Erases all of the queue's elements.
|
IFunc2Arg<T,T,java.lang.Boolean> |
Compare()
Returns the function object that can compare two elements to
determine their relative order in the priority queue.
|
void |
Dequeue()
Removes the element at the top of the queue that
is the largest element in the queue.
|
boolean |
Empty()
Returns true only if the queue contains no elements.
|
void |
Enqueue(T item)
Inserts an element into the queue that will become the top element
only if it happens to be larger than any of the elements already
in the queue.
|
boolean |
equals(java.lang.Object obj)
Tests whether this instance is equal to a specified object.
|
boolean |
equals(PriorityQueue64<T> x)
Tests whether this instance is equal to a specified
Vector object.
|
int |
hashCode()
Returns the hash code for this instance.
|
long |
MaxSize()
Returns the queue's maximum possible size.
|
T |
Peek()
Gets the largest element at the front of the queue.
|
long |
Size()
Returns the number of elements contained in the queue.
|
public PriorityQueue64(java.lang.Class<T> type)
type - The specified type of the container elements.public IFunc2Arg<T,T,java.lang.Boolean> Compare()
public long Size()
public long MaxSize()
public boolean Empty()
public T Peek()
java.lang.RuntimeException - When the queue is empty.public void Enqueue(T item)
item - The element added to the end of the queue.java.lang.RuntimeException - When the queue is full.public void Dequeue()
java.lang.RuntimeException - When the queue is empty.public void Clear()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - An object to compare with this instance.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(PriorityQueue64<T> x)
x - An object to compare with this instance.Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.