public static class IntPriorityQueues.SynchronizedPriorityQueue extends java.lang.Object implements IntPriorityQueue
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
clears all elements within the PriorityQueue,
this does not resize the backing arrays
|
IntComparator |
comparator() |
IntPriorityQueue |
copy()
A Function that does a shallow clone of the PriorityQueue itself.
|
int |
count(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
int |
dequeue()
Method to extract a element from the PriorityQueue
|
void |
enqueue(int e)
Method to insert a element into the PriorityQueue
|
void |
enqueueAll(int[] e,
int offset,
int length)
Method to mass insert elements into the PriorityQueue
|
void |
enqueueAll(IntCollection c)
Method to mass insert elements into the PriorityQueue
|
int |
findFirst(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
<E> void |
forEach(E input,
ObjectIntConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(IntConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
IntIterator |
iterator()
Returns an iterator over elements of type
T. |
boolean |
matchesAll(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(java.util.function.IntPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(java.util.function.IntPredicate 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
|
int |
peek(int index)
Peeking function to see whats inside the queue.
|
boolean |
removeFirst(int e)
Removes the first found element in the queue
|
boolean |
removeLast(int e)
Removes the last found element in the queue
|
int |
size() |
int[] |
toIntArray(int[] 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, toIntArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, forEachIndexed, limit, map, peek, pour, pourAsList, pourAsSet, reduce, reduce, repeat, sorted, spliteratorpublic IntIterator iterator()
IntIterableT.iterator in interface java.lang.Iterable<java.lang.Integer>iterator in interface IntIterablepublic int size()
size in interface IntPriorityQueuepublic void clear()
IntPriorityQueueclear in interface IntPriorityQueuepublic void enqueue(int e)
IntPriorityQueueenqueue in interface IntPriorityQueuee - the element that should be insertedpublic void enqueueAll(int[] e,
int offset,
int length)
IntPriorityQueueenqueueAll in interface IntPriorityQueuee - 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(IntCollection c)
IntPriorityQueueenqueueAll in interface IntPriorityQueuec - the elements that should be inserted from the Collectionpublic int dequeue()
IntPriorityQueuedequeue in interface IntPriorityQueuepublic int peek(int index)
IntPriorityQueuepeek in interface IntPriorityQueueindex - of the element that is requested to be viewed.public boolean removeFirst(int e)
IntPriorityQueueremoveFirst in interface IntPriorityQueuee - the element that should be removedpublic boolean removeLast(int e)
IntPriorityQueueremoveLast in interface IntPriorityQueuee - the element that should be removedpublic void onChanged()
IntPriorityQueueonChanged in interface IntPriorityQueuepublic IntComparator comparator()
comparator in interface IntPriorityQueuepublic int[] toIntArray(int[] input)
IntPriorityQueuetoIntArray in interface IntPriorityQueueinput - where the elements should be inserted to. If it does not fit then it creates a new appropiatly created arraypublic IntPriorityQueue copy()
IntPriorityQueuecopy in interface IntPriorityQueuepublic void forEach(IntConsumer action)
IntIterableforEach in interface IntIterableaction - The action to be performed for each elementIterable.forEach(Consumer)public <E> void forEach(E input,
ObjectIntConsumer<E> action)
IntIterableforEach in interface IntIterableE - 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.IntPredicate filter)
IntIterablematchesAny in interface IntIterablefilter - that should be appliedpublic boolean matchesNone(java.util.function.IntPredicate filter)
IntIterablematchesNone in interface IntIterablefilter - that should be appliedpublic boolean matchesAll(java.util.function.IntPredicate filter)
IntIterablematchesAll in interface IntIterablefilter - that should be appliedpublic int findFirst(java.util.function.IntPredicate filter)
IntIterablefindFirst in interface IntIterablefilter - that should be appliedpublic int count(java.util.function.IntPredicate filter)
IntIterablecount in interface IntIterablefilter - that should be applied