T
- public class UpdatablePriorityQueue<T extends MutablePriorityObject> extends Object
Constructor and Description |
---|
UpdatablePriorityQueue(boolean ascending)
Standard constructor of the UpdatableQueue class.
|
Modifier and Type | Method and Description |
---|---|
UpdatablePriorityQueue<T> |
clone() |
T |
contains(T name) |
double |
firstValue()
Returns the Value of the first object in the queue.
|
boolean |
getOrder() |
void |
insertAdditive(T po)
inserts an object to the queue at the appropriate position, or updates the priority (adding a value) and the
position if the object is already in the queue.
|
void |
insertIfBetter(T po)
inserts an object to the queue at the appropriate position, or updates the priority and the position if the
object is already in the queue and it's new priority is higher than the old one.
|
boolean |
isEmpty() |
T |
removeFirst()
Removes the first object from the queue and returns that object to the caller.
|
int |
size()
Returns the size of the priority queue.
|
public UpdatablePriorityQueue(boolean ascending)
ascending
- public void insertIfBetter(T po)
public void insertAdditive(T po)
po
- The priority object to be addedpublic int size()
public double firstValue()
public boolean isEmpty()
public T removeFirst()
public UpdatablePriorityQueue<T> clone()
public boolean getOrder()
Copyright © 2015. All Rights Reserved.