public static class LongPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements LongPriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
LongComparator |
comparator() |
LongPriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
int |
count(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
long |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(long e)
Method to insert a element into the PriorityQueue
|
void |
enqueueAll(long[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
void |
enqueueAll(LongCollection c)
Method to mass insert elements into the PriorityQueue
|
long |
findFirst(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
<E> void |
forEach(E input,
ObjectLongConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(LongConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
LongIterator |
iterator()
Returns an iterator over elements of type
T. |
boolean |
matchesAll(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.LongPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
void |
onChanged()
Allows to notify the Queue to be revalidate its data
|
long |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(long e)
Removes the first found element in the queue
|
boolean |
removeLast(long e)
Removes the last found element in the queue
|
int |
size() |
long[] |
toLongArray(long[] input)
A method to drop the contents of the Queue without clearing the queue
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenqueueAll, enqueueAll, first, isEmpty, synchronizeQueue, synchronizeQueue, toLongArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, forEachIndexed, limit, map, peek, pour, pourAsList, pourAsSet, reduce, reduce, repeat, sorted, spliteratorpublic LongIterator iterator()
LongIterableT.iterator in interface java.lang.Iterable<java.lang.Long>iterator in interface LongIterablepublic int size()
size in interface LongPriorityQueuepublic void clear()
LongPriorityQueueclear in interface LongPriorityQueuepublic void enqueue(long e)
LongPriorityQueueenqueue in interface LongPriorityQueuee - the element that should be insertedpublic void enqueueAll(long[] e,
int offset,
int length)
LongPriorityQueueenqueueAll in interface LongPriorityQueuee - the elements that should be insertedoffset - the offset where in the array should be startedlength - the amount of elements that should be insertedpublic void enqueueAll(LongCollection c)
LongPriorityQueueenqueueAll in interface LongPriorityQueuec - the elements that should be inserted from the Collectionpublic long dequeue()
LongPriorityQueuedequeue in interface LongPriorityQueuepublic long peek(int index)
LongPriorityQueuepeek in interface LongPriorityQueueindex - of the element that is requested to be viewed.public boolean removeFirst(long e)
LongPriorityQueueremoveFirst in interface LongPriorityQueuee - the element that should be removedpublic boolean removeLast(long e)
LongPriorityQueueremoveLast in interface LongPriorityQueuee - the element that should be removedpublic void onChanged()
LongPriorityQueueonChanged in interface LongPriorityQueuepublic LongComparator comparator()
comparator in interface LongPriorityQueuepublic long[] toLongArray(long[] input)
LongPriorityQueuetoLongArray in interface LongPriorityQueueinput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraypublic LongPriorityQueue copy()
LongPriorityQueuecopy in interface LongPriorityQueuepublic void forEach(LongConsumer action)
LongIterableforEach in interface LongIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectLongConsumer<E> action)
LongIterableforEach in interface LongIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(java.util.function.LongPredicate filter)
LongIterablematchesAny in interface LongIterablefilter - that should be appliedpublic boolean matchesNone(java.util.function.LongPredicate filter)
LongIterablematchesNone in interface LongIterablefilter - that should be appliedpublic boolean matchesAll(java.util.function.LongPredicate filter)
LongIterablematchesAll in interface LongIterablefilter - that should be appliedpublic long findFirst(java.util.function.LongPredicate filter)
LongIterablefindFirst in interface LongIterablefilter - that should be appliedpublic int count(java.util.function.LongPredicate filter)
LongIterablecount in interface LongIterablefilter - that should be applied