de.cau.cs.kieler.sj.util
Class PriorityQueue<T extends Comparable<T>>
java.lang.Object
de.cau.cs.kieler.sj.util.AbstractCollection<T>
de.cau.cs.kieler.sj.util.PriorityQueue<T>
- Type Parameters:
T
- The type of the element inserts into the list.
- All Implemented Interfaces:
- Iterable<T>
public class PriorityQueue<T extends Comparable<T>>
- extends AbstractCollection<T>
A simple PriorityQueue how we need them for SJ.
- Rating

Constructor Summary |
PriorityQueue()
Creates a new empty PriorityQueue. |
Method Summary |
void |
add(T o)
Adds a given element to the collection. |
T |
peek()
Return the first value of the queue. |
T |
poll()
Return and delete the first value of the queue. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PriorityQueue
public PriorityQueue()
- Creates a new empty PriorityQueue.
peek
public T peek()
- Return the first value of the queue.
- Returns:
- The first value of the queue.
- See Also:
poll()
poll
public T poll()
- Return and delete the first value of the queue.
- Returns:
- The first value of the queue.
- See Also:
peek()
add
public void add(T o)
- Description copied from class:
AbstractCollection
- Adds a given element to the collection.
- Specified by:
add
in class AbstractCollection<T extends Comparable<T>>
- Parameters:
o
- The element to add.