T - the type of elements maintained by this Collectionpublic interface ObjectPriorityQueue<T>
extends java.lang.Iterable<T>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
java.util.Comparator<? super T> |
comparator() |
T |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(T e)
Method to insert a element into the PriorityQueue
|
default T |
first()
Shows the element that is to be returned next
|
default boolean |
isEmpty() |
void |
onChanged()
Allows to notify the Queue to be revalidate its data
|
T |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
remove(T e)
Removes the first found element in the queue
|
boolean |
removeLast(T e)
Removes the last found element in the queue
|
int |
size() |
default T[] |
toArray()
A method to drop the contents of the Queue without clearing the queue
|
T[] |
toArray(T[] input)
A method to drop the contents of the Queue without clearing the queue
|
default boolean isEmpty()
int size()
void clear()
void enqueue(T e)
e - the element that should be insertedT dequeue()
java.util.NoSuchElementException - if no element is presentT peek(int index)
index - of the element that is requested to be viewed.default T first()
boolean remove(T e)
e - the element that should be removedboolean removeLast(T e)
e - the element that should be removedvoid onChanged()
java.util.Comparator<? super T> comparator()
default T[] toArray()
T[] toArray(T[] input)
input - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created array