public class PrioritizedQueue<T>
extends java.lang.Object
Constructor and Description |
---|
PrioritizedQueue(IPrioritizer<T> prioritizer) |
Modifier and Type | Method and Description |
---|---|
void |
add(T item) |
void |
clear() |
java.util.Collection<T> |
get()
return all the elements in order of priority (and insertion if priorities
are the same)
|
double |
getFirstPriority()
first key, or NaN if empty
|
double |
getFirstPriorityAfter(double afterPriority)
first key after afterPriority, or NaN
|
int |
getSize() |
boolean |
isEmpty() |
void |
remove(double upThrough,
java.util.Collection<T> removedEvents)
return all the items of less than or equal to upThrough
|
boolean |
remove(T item) |
public PrioritizedQueue(IPrioritizer<T> prioritizer)
public void clear()
public void add(T item)
public boolean remove(T item)
public void remove(double upThrough, java.util.Collection<T> removedEvents)
upThrough
- public java.util.Collection<T> get()
public double getFirstPriority()
public double getFirstPriorityAfter(double afterPriority)
afterPriority
- public boolean isEmpty()
public int getSize()