T - the type of elements maintained by this Collectionpublic interface ObjectPriorityQueue<T> extends ObjectIterable<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() |
ObjectPriorityQueue<T> |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
T |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(T e)
Method to insert a element into the PriorityQueue
|
default void |
enqueueAll(java.util.Collection<? extends T> c)
Method to mass insert elements into the PriorityQueue
This method exists to add support for Java Collections to make it more useable
|
default void |
enqueueAll(ObjectCollection<T> c)
Method to mass insert elements into the PriorityQueue
|
default void |
enqueueAll(T... e)
Method to mass insert elements into the PriorityQueue
|
default void |
enqueueAll(T[] e,
int length)
Method to mass insert elements into the PriorityQueue
|
default void |
enqueueAll(T[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
default T |
first()
Shows the element that is to be returned next
|
default boolean |
isEmpty() |
ObjectIterator<T> |
iterator()
Returns an iterator over elements of type
T. |
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 |
removeFirst(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 ObjectPriorityQueue<T> |
synchronizeQueue()
Creates a Wrapped PriorityQueue that is Synchronized
|
default ObjectPriorityQueue<T> |
synchronizeQueue(java.lang.Object mutex)
Creates a Wrapped PriorityQueue that is Synchronized
|
default <E> E[] |
toArray()
A method to drop the contents of the Queue without clearing the queue
|
<E> E[] |
toArray(E[] input)
A method to drop the contents of the Queue without clearing the queue
|
default T[] |
toArray(Int2ObjectFunction<T[]> action)
A Helper function that simplifies the process of creating a new Array.
|
arrayflatMap, asAsync, count, distinct, filter, findFirst, flatMap, forEach, limit, map, matchesAll, matchesAny, matchesNone, peek, pour, pourAsList, pourAsSet, reduce, reduce, sorted, spliteratordefault boolean isEmpty()
int size()
void clear()
void enqueue(T e)
e - the element that should be inserteddefault void enqueueAll(T... e)
e - the elements that should be inserteddefault void enqueueAll(T[] e, int length)
e - the elements that should be insertedlength - the amount of elements that should be inserteddefault void enqueueAll(T[] e, int offset, int length)
e - the elements that should be insertedoffset - the offset where in the array should be startedlength - the amount of elements that should be inserteddefault void enqueueAll(ObjectCollection<T> c)
c - the elements that should be inserted from the Collectiondefault void enqueueAll(java.util.Collection<? extends T> c)
c - the elements that should be inserted from the CollectionT 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 removeFirst(T e)
e - the element that should be removedboolean removeLast(T e)
e - the element that should be removedvoid onChanged()
ObjectPriorityQueue<T> copy()
java.util.Comparator<? super T> comparator()
ObjectIterator<T> iterator()
ObjectIterableT.iterator in interface java.lang.Iterable<T>iterator in interface ObjectIterable<T>default ObjectPriorityQueue<T> synchronizeQueue()
ObjectPriorityQueues.synchronize(speiger.src.collections.objects.queues.ObjectPriorityQueue<T>)default ObjectPriorityQueue<T> synchronizeQueue(java.lang.Object mutex)
mutex - is the controller of the synchronization blockObjectPriorityQueues.synchronize(speiger.src.collections.objects.queues.ObjectPriorityQueue<T>)default <E> E[] toArray()
E - the type of elements maintained by this Collection<E> E[] toArray(E[] input)
E - the type of elements maintained by this Collectioninput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraydefault T[] toArray(Int2ObjectFunction<T[]> action)
action - the array creation functionCollection.toArray(Object[])