T - the type of elements to be inserted into the soft priority queuepublic interface SoftPriorityQueue<T>
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<T> |
corrupted()
Returns a
Collection of corrupted elements -- that is, elements which are associated
with the wrong key. |
default boolean |
empty()
Returns whether the queue is empty.
|
void |
insert(T element)
Inserts an element into the queue.
|
T |
peek()
Peeks into the top of the queue, returning the element which is believed to have
minimal key.
|
T |
pop()
Peeks into the top of the queue, returning the element which is believed to have
minimal key.
|
int |
size()
Returns the size of the queue.
|
T peek()
T pop()
java.util.Collection<T> corrupted()
Collection of corrupted elements -- that is, elements which are associated
with the wrong key.Collection of corrupted elementsvoid insert(T element)
element - the element to be insertedint size()
default boolean empty()