T
- Elements typepublic class QueuePriority<T>
extends java.lang.Object
Comparable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
QueuePriority.CompatorElement<T>
|
(package private) static class |
QueuePriority.Element<T>
Element of the queue
Last modification : 19 juin 2010 Version 0.0.0 |
Modifier and Type | Field and Description |
---|---|
private java.util.PriorityQueue<QueuePriority.Element<T>> |
queue
Priority queue
|
Constructor and Description |
---|
QueuePriority(boolean increment)
Constructs QueuePriority
|
private final java.util.PriorityQueue<QueuePriority.Element<T>> queue
public QueuePriority(boolean increment)
increment
- Indicates if priority are take in increment orderpublic T dequeue()
public void enqueue(int priority, T element)
priority
- Priorityelement
- Elementpublic boolean isEmpty()
true
if queue is emptypublic int size()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()